Hello,你們好,我是CrazyCodes,以前在極客時間上買過一個git鼠標墊,感受其知識點展現的很是幹練,現手敲分享給你們,文末有購買連接。git
git config --global user.name '您的名稱' git config --global user.email '您的Email'
git config --local user.name '您的名稱' git config --local user.email '您的Email'
git config --global --list
git config --local --list
git config --unset --global 某個配置項
git config --unset --local 某個配置項
git status
git branch -v
git checkout 指定分支
git add .
git add -A
git add 文件1 文件2 文件3
git commit
git diff 某文件
git diff HEAD 某文件
git diff --cached
git checkout 文件1 文件2 文件3
git reset 文件1 文件2 文件3
git reset --hard
git difftoll 提交A 提交B
git is-files --others
git stash
git stash pop 或者 git stash apply
pop不保留stash,apply保留stash安全
git stash list
git stash pop stash@{數字n}
git add .
git commit --amend
git rebase -i X前面一個commit的id
git add .
git rebase --continue
後續可能須要處理衝突,直到rebase結束app
git log --oneline
git log -n
git log --oneline --graph --all
git log 某文件
git blame 某文件
git branch 新分支
git branch 新分支 已有分支
git branch 新分支 某個commit的id
git checkout -b 新分支
git branch -v
git branch -av
git branch -rv
git branch -rv -l '某樣式'
git branch -d 擬刪除分支
git branch -D 擬刪除分支
git branch --merged master | grep -v '^\*\| master' | xargs -n 1 git branch -d
git remote prune origin
git tag 標籤名 commit的id
git merge A分支
git merge A分支 B分支
git rebase B分支
git rebase B分支 A分支
git mergetool
git remote -v
git remote add url地址
git remote remove remote的名稱
git remote rename 舊名稱 新名稱
git fetch remote
git pull remote 名稱 分支名
git push remote 名稱 分支名
git push remote --delete 遠端分支名 或者 git push remote 遠端分支名
git push remote 標籤名
git push remote --tags
感謝你看到這裏,但願本篇文章能夠幫到你,謝謝。fetch
鼠標墊內容做者:蘇玲 購買連接url