View Code? Open in Web Editor
NEW
This project forked from shfshanyue/cheat-sheets
Home Page: https://shfshanyue.github.io/cheat-sheets/git
JavaScript 32.74%
CSS 34.34%
HTML 32.92%
cheat-sheets's Introduction
查看卡片式效果
``` sh
git init
```
``` sh
git init --bare
```
``` sh
git clone
```
``` sh
git config [--global] -e
```
``` sh
git config -l
```
``` sh
git config --get core.editor
```
``` sh
git config --global user.email
```
``` sh
git config --global user.name
```
``` sh
git config color.ui true
```
``` sh
git config core.ignoreCase false
```
``` sh
git config push.default simple
```
``` sh
git config --global core.editor vim
```
``` sh
git config --global alias.co checkout
```
``` sh
vim .gitignore
```
``` sh
vim .git/info/exclude
```
``` sh
git config --global core.excludesfile ~/.gitignore
```
``` sh
git update-index --assume-unchanged
```
``` sh
git update-index --no-assume-unchanged
```
``` sh
git add -A
```
``` sh
git add -u
```
``` sh
git add -p
```
``` sh
git rm
```
``` sh
git rm --cached
```
``` sh
git mv
```
``` sh
git status
```
``` sh
git status -sb
```
``` sh
git status --ignored
```
``` sh
git check-ignore *
```
``` sh
git diff
```
``` sh
git diff --cached
```
``` sh
git diff HEAD
```
``` sh
git diff --name-only
```
``` sh
git diff
```
``` sh
git show
```
``` sh
git ls-files
```
``` sh
git ls-files -o
```
``` sh
git ls-files --full-name
```
``` sh
git stash
```
``` sh
git stash save
```
``` sh
git stash apply
```
``` sh
git stash pop
```
``` sh
git stash list
```
``` sh
git checkout --
```
``` sh
git checkout .
```
``` sh
git clean -n
```
``` sh
git clean -f
```
``` sh
git clean -Xf
```
``` sh
git clean -df
```
``` sh
git reset
```
``` sh
git reset --hard
```
``` sh
git reset --hard
```
``` sh
git reset --soft
```
``` sh
git reset --mixed
```
``` sh
git revert
```
``` sh
git branch
```
``` sh
git branch -vv
```
``` sh
git branch -r
```
``` sh
git branch -a
```
``` sh
git branch
```
``` sh
git branch -d
```
``` sh
git branch -D
```
``` sh
git branch -m
```
``` sh
git branch -u
```
``` sh
git checkout
```
``` sh
git checkout -b
```
``` sh
git checkout -
```
``` sh
git checkout --orphan
```
``` sh
git merge develop
```
``` sh
git merge -no-ff develop
```
``` sh
git merge -
```
``` sh
git rebase develop
```
``` sh
git rebase -i
```
``` sh
git remote add origin
```
``` sh
git remote set-url origin
```
``` sh
git remote -v
```
``` sh
git remote show origin
```
git config push.default simple
``` sh
设置默认推送策略为 simple
```
``` sh
git push origin master
```
``` sh
git push -u origin master
```
``` sh
git push -n
```
``` sh
git pull origin master
```
``` sh
git pull --rebase origin master
```
``` sh
git commit -m
```
``` sh
git commit --amend -m
```
``` sh
git commit --amend --author=
```
``` sh
git commit --allow-empty
```
``` sh
git commit -n
```
``` sh
git log
```
``` sh
git log -p
```
``` sh
git log --graph --all --oneline --decorate
```
``` sh
git log --pretty=raw
```
``` sh
git log --since '2 days ago'
```
``` sh
git log --author=
```
``` sh
git log --grep=
```
``` sh
git log -S
```
``` sh
git log master...develop
```
列出 branch 有而 branch2 没有的提交
``` sh
git log branch2..branch
```
``` sh
git log --merges
```
``` sh
git shortlog
```
``` sh
git shortlog -sn
```
``` sh
git tag -ln
```
``` sh
git tag -a v1.0.0 -m
```
``` sh
git tag v0.9.0
```
``` sh
git tag -d v1.0.0
```
``` sh
git show v1.0.0
```
``` sh
git push --tags
```
``` sh
git describe
```
``` sh
git blame
```
``` sh
git blame -L 10,18
```
``` sh
git log -p
```
``` sh
git bisect start
git checkout HEAD~20
git bisect good
git bisect bad
git bisect reset
```
``` sh
git cat-file -t
```
``` sh
git cat-file -p
```
``` sh
git grep -n hello
```
``` sh
git archive -o arch.zip HEAD
```
cheat-sheets's People
Contributors