1. 程式人生 > >擇一城終老,遇一人白首。

擇一城終老,遇一人白首。



--刪除新增檔案
git clean -df

--撤銷本地檔案修改
git checkout -- <file>

--回退至指定版本
git reset --hard <version>

--本地git分支重新命名
git branch -m <oldbranchname> <newbranchname>

--刪除本地分支
git branch -d <BranchName>

--刪除遠端分支
git push origin --delete <branchName>

--git remote prune origin 清理遠端分支,把本地不存在的遠端分支刪除
git fetch -p