git config
git config user.name yijinc --local
git config user.email yijincai@org.com --local
git config core.ignorecase false
git config --global alias.history "log --graph --pretty=format:'%C(yellow)%h%Creset %cd | %Cgreen%s%Creset %Cred%d%Creset %Cblue<%an>' --date=format:'%Y-%m-%d %H:%M:%S' --abbrev-commit"
git add
git add [file1] [file2] ...
git add [dir]
git add .
git reset
git reset [file1] [file2] ...
git reset HEAD^
git reset --hard [commited-hash]
git commit
git commit -m "message"
git commit -m "message" [file1] [file2] ...
git commit -m "message" --allow-empty
git commit -v
git commit --amend -m "message"
git checkout
git checkout -b [new-branch]
git checkout -b [new-branch] [from-branch]
git checkout [branch-name]
git checkout [commit-hash]
git checkout [commit-hash] [file]
git checkout -
git checkout -- [filename]
git checkout .
git branch
git branch
$ git branch -r
git branch -a
git branch -vv
git branch [new-branch]
git branch [new-branch] [commit-hash]
git branch [local-branch] [remote/branch] --track
git branch [local-branch] --set-upstream-to=[remote/branch]
git branch -d [branch]
git branch -D [branch]
git branch -dr [remote/branch]
git push origin --delete [branch]
git fetch
git fetch [remote]
git fetch --prune
git merge
git merge [branch]
git merge [remote/branch]
git merge [branch] --abort
git pull
git pull [remote] [branch]
git pull [remote] [remote-branch]:[local-branch]
git push
git push [remote] [branch]
git push [remote] [local-branch]:[remote-branch]
git push [remote] refs/heads/[local-branch]:refs/heads/[remote-branch]
git push [remote] --all
git remote
git remote -v
git remote show [remote]
git remote add [shortname] [url]
git show
git show [commit-hash]
$ git show [commit] --name-only
$ git show [commit]:[filename]
git tag
git tag
git tag [tag-name]
git tag [tag-name] [commit]
git tag -a [tag-name] -m "annotate message"
git show [tag-name]
git push [remote] [tag-name]:[tag-name]
git tag -d [tag-name]
git push [remote] :[tag-name]
git push [remote] :refs/tags/[tag-name]
git status
git status
git config
git config --list
git config -e [--global]
git config [--global] user.name "name"
git config [--global] user.email "email address"
git log
git log
git log -n
git log --stat
git log -S [keyword]
git log --follow [file]
git whatchanged [file]
git log -p [file]
git config --global alias.history 'log --pretty=format:"%h %ad : %s %d [%an]" --graph --date=iso'
git history
git stash
git stash
git stash list
git stash ( apply | pop )