git branch命令
刪除分支
git branch -d dev/domestic
強(qiáng)制刪除分支
git branch -D dev/domestic
列出所有本地分支(當(dāng)前分支前標(biāo) *)
git branch
列出所有分支(包括遠(yuǎn)程分支)
git branch -a
基于當(dāng)前分支創(chuàng)建新分支
git branch <分支名>
刪除已合并的分支
git branch -d <分支名>
強(qiáng)制刪除 未合并的分支
git branch -D <分支名>
重命名當(dāng)前分支
git branch -m <新分支名>
git臨時(shí)保存
快速保存所有 已跟蹤文件 的修改(默認(rèn)不包含未跟蹤文件)
git stash
保存并添加描述信息(推薦替代 git stash save)
git stash push -m "備注"
查看所有保存的記錄(顯示 stash@{n}格式的 ID)
git stash list
恢復(fù) 最近一次 保存的記錄并刪除該記錄
git stash pop
恢復(fù)記錄但 不刪除(可重復(fù)應(yīng)用)
git stash apply