Git (/ɡɪt/) is a version control system for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for source code management in software development, but it can be used to keep track of changes in any set of files. As a distributed revision control system, it is aimed at speed, data integrity, and support for distributed, non-linear workflows. For more detail, see Wikipedia.

JGit: Config Loading Optimization

How JGit optimizes internally the configuration loading process using file snapshots and reduces unnecessary file I/O?

6 Tips for Fixing Bugs with Legacy Frameworks

In my daily work, I have to deal with legacy frameworks. Here are 6 tips that I summarized for bug-fixing, including documentation, searching, testing, patching library and more.

Prepare Commit Message using Git Hook

Create a Git hook prepare-commit-msg for inferring JIRA ticket as commit message prefix, based on the branch name.

Merging 20 Git Repositories

Recently, I merged 20 Git repositories into a single one while keeping the history. Here's how I did it.

Customize Git Prompt in MinGW

Customize Git prompt to show dirty-state, untracked files, stash, upstream in your Bash console: MinGW64 (Minimalist GNU for Windows x64).

Merging Git Repositories

Engineering story: how I merge two Git repositories and what are the hidden tasks you didn't think about.

JGit: Protect Branches on Git Server

If you're using JGit for your Git server, you can combine Git config (.git/config) and a customized pre-receive hook to protect branches on a specific Git repository.

Git: Understanding Git Config

The format of Git internal configuration file (.git/config) is very simple: it has multiple sections, each of which contains multiple options. An option is indeed a key-value pair...

JGit: Customize Git references using RefFilter

This post explains how to apply a Git reference filter to your Git server in Java. It allows you to customize Git references before sending data to clients (upload-pack).

Git: Communication over HTTP

What happens when Git communicates over HTTP protocol? In this post, I'll intercept the HTTP traffic to discover git-receive-pack, git-upload-pack and more.

Git: Upstream Tracking Understanding

A quick introduction about Git upstream tracking: set upstream with git-push or git-branch, the internal mechanism inside Git config (.git/config), unset upstream, and related implementation in Java (JGit).

Git: Understanding the Index File

Git index file (.git/index) is a binary file having the following format: a 12-byte header, a number of sorted index entries, extensions, and a SHA-1 checksum. Now let's create a new Git repository, and see how index file changes when a new file is added.

JGit Internal: Reference and RevObject

Today, I want to discuss Git internal mechanism with you: How Git resolves references? How JGit, a pure Java implementation of Git, resolves references in Java? Then, how to use them via class RevObject and its subtypes.

Highlight 2017

Today, I'd like to share with you the review of year 2017.

What Is Git Branch?

Many developers use Git in their daily life. Among all the operations, branch commands might be one of the most important part. But do you know what “branch” is, and what are the secrets behind branches? This blog post will share some Git internals with you.

Git Repository Transfer

A step-by-step guide for transferring a Git repository from one place to another while keeping the entirety of the data, including all branches and tags.

Setup GitLab Sever Locally

Here’s the guide about how to setup a GitLab server locally using Docker under mac OS through the following steps:

  1. Create folder in file system to store GitLab data.
  2. Create GitLab container.
  3. Setup GitLab container.
  4. Setup a new user.

Learning Git Basics

Learning Git Basics.

Miscellaneous Tips for Development

Miscellaneous tips for development in Git and Maven.

Git Hook for JIRA Number

Git commit hook for checking the JIRA number before commiting.