git branch命令
删除分支
git branch -d dev/domestic
强制删除分支
git branch -D dev/domestic
列出所有本地分支(当前分支前标 *)
git branch
列出所有分支(包括远程分支)
git branch -a
基于当前分支创建新分支
git branch <分支名>
删除已合并的分支
git branch -d <分支名>
强制删除 未合并的分支
git branch -D <分支名>
重命名当前分支
git branch -m <新分支名>
git临时保存
快速保存所有 已跟踪文件 的修改(默认不包含未跟踪文件)
git stash
保存并添加描述信息(推荐替代 git stash save)
git stash push -m "备注"
查看所有保存的记录(显示 stash@{n}格式的 ID)
git stash list
恢复 最近一次 保存的记录并删除该记录
git stash pop
恢复记录但 不删除(可重复应用)
git stash apply