git clone <url> #克隆遠程版本庫
git init #初始化本地版本庫
git status #查看狀態
git diff #查看變更內容
git add . #添加所有改動過的文件
git add <FileUrl> #添加指定路徑的文件
git mv <old> <new> #文件名修改
git rm <FileUrl> #刪除指定路徑文件
git add rm --cache <FileUrl> #停止跟蹤指定路徑文件
git commit -m "remark" #提交所有更新過的文件
git commit --amend #修改最後一次提交
git log #查看提交歷史
git log -p <file> #查看指定路徑文件提交歷史
git blame <file> #以列表方式查看指定路徑文件提交歷史
git reset --hard HEAD #撤銷工作目錄中所有未提交的文件修改(回退到指定版本)
git checkout HEAD <file> #撤銷指定路徑未提交的文件修改
git revert <commit> #撤銷指定的提交
git branch #顯示所有的本地分支
git checkout <branch> #切換到指定分支
git branch <new-branch> #創建新分支
git branch -d <branch> #刪除本地分支
git tag #列出所有本地標籤
git tag <tagname> #基於最新提交創建標籤
git tag -d <tagname> #刪除標籤
git merage <branch> #合併指定分支到當前分支
git rebase <branch> #衍合指定分支到當前分支
git remote -v #查看遠程版本信息庫信息
git remote show <remote> #查看指定遠程版本信息庫信息
git remote add <remote> <url> #添加遠程版本庫
git fetch <remote> #從遠程庫獲取代碼
git pull <remote> <branch> #下載代碼及快速合併
git push <remote> <branch> #上傳代碼及快速合併
git push <remote> :<branch/tag-name> #刪除遠程分支或標籤
git push --tags #上傳所有標籤