# 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](https://missing.csail.mit.edu/2020/version-control/) in English, or you can watch this [Git tutorial (by 尚硅谷)](https://www.bilibili.com/video/BV1vy4y1s7k6) in Chinese. 
2. Read Chap1 - Chap5 of this open source book [Pro Git](https://git-scm.com/book/en/v2). Yes, to learn Git, you need to read a book. 
3. 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](https://chris.beams.io/posts/git-commit/). 
4. 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](https://wyag.thb.lt/) will satisfy you! 
5. 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](https://github.com/danistefanovic/build-your-own-x) and [project-based-learning](https://github.com/tuvtran/project-based-learning), collected many wheel-reinventing tutorials, e.g., text editor, virtual machine, docker, TCP and so on. 
