Skip to content

# Git

## Why Git

Git is a distributed version control system. The father of Linux, Linus Torvalds developed Git to maintain the version control of Linux, replacing the centralized version control tools which were difficult and costly to use.

The design of Git is very elegant, but beginners usually find it very difficult to use without understanding its internal logic. It is very easy to mess up the version history if misusing the commands.

Git is a powerful tool and when you finally master it, you will find all the effort paid off.

## How to learn Git

Different from Vim, I don't suggest beginners use Git rashly without fully understanding it, because its inner logic can not be acquainted by practicing. Here is my recommended learning path:

1. Read this Git tutorial in English, or you can watch this Git tutorial (by 尚硅谷) in Chinese.
2. Read Chap1 - Chap5 of this open source book Pro Git. Yes, to learn Git, you need to read a book.
3. Learn Git Branching is an interactive Git learning website that can help you quickly get started with using Git.
4. Now that you have understood its principles and most of its usages, it's time to consolidate those commands by practicing. How to use Git properly is a kind of philosophy. I recommend reading this blog How to Write a Git Commit Message.
5. You are now in love with Git and are not content with only using it, you want to build a Git by yourself! Great, that's exactly what I was thinking. This tutorial will satisfy you!
6. What? Building your own Git is not enough? Seems that you are also passionate about reinventing the wheels. These two GitHub projects, build-your-own-x and project-based-learning, collected many wheel-reinventing tutorials, e.g., text editor, virtual machine, docker, TCP and so on.

2025-06-16