---
title: Git
category:
tag:
- Git
---
##
###
###
###

###
Centralized Version Control Systems CVCS

- ****
- ****
###
Distributed Version Control System DVCS Git

Git
## Git
### Git
Linux BitKeeper BitKeeper Linux Linux BitKeeper Linux Linux Linus Torvalds BitKeeper
### Git
Git
Git ****
**Git **
CVSSubversionPerforceBazaar ****
(Delta)

****
****
Git Git Git Git Git ****

### Git
Git
1. **committed**
2. **modified**
3. **staged**
Git **Git (.git directory)****(Working Directory)** **(Staging Area)**

** Git **
1.
2.
3. Git
## Git
### Git
Git
1. : `git init` , `.git`
2. Git : `git clone [url]` : `git clone [url] directoryname`
###
1. **** : `git status`
2. ****`git add filename` ()`git add *`()`git add *.txt` .txt
3. ****`.gitignore`
4. **:** `git commit -m ""` `git status` `git commit`
5. **** : `git commit -a -m ""` `git commit` `-a` Git `git add`
6. **** `git rm filename`
7. **** `git mv README.md README`(`mv README.md README``git rm README.md``git add README` )
### Git
Git
"git log"
Git
###
- `git remote add origin ` , Github `git remote add origin https://github.com/Snailclimb/test.git`
- `git push origin master` ( _master_ )
###
- test test1`git remote rename test test1`
- test1:`git remote rm test1`
###
`git log` `git log`
****
```shell
git log --author=bob
```
###
`--amend`
```shell
git commit --amend
```
```shell
git reset filename
```
:
```shell
git checkout -- filename
```
```shell
git fetch origin
git reset --hard origin/master
```
###
_master_
bug
test
```shell
git branch test
```
testGit Git
```shell
git checkout test
```

()
```shell
git checkout -b feature_x
```
```shell
git checkout master
```
()
```shell
git merge test
```
```shell
git branch -d feature_x
```
```shell
git push origin
```
##
****
[issue729](https://github.com/Snailclimb/JavaGuide/issues/729)Learn Git Branching https://oschina.gitee.io/learn-git-branching/ git
****
- [Git (1.5W 40 ) ](https://www.cnblogs.com/anding/p/16987769.html)
- [Git - ](https://rogerdudler.github.io/git-guide/index.zh.html) Git
- [ Git](https://marklodato.github.io/visual-git-guide/index-zh-cn.html) Git git
- [ Git ](https://backlog.com/git-tutorial/cn/intro/intro1_1.html)
- [Pro Git book](https://git-scm.com/book/zh/v2) Git