git add . git add –all
git log –oneline –graph
git rm xxxx –cached
git commit –amend -m “xxxx” 修改最后一次commit信息 git rebase git reset
git clean -fX 清除忽略的文件 git blame xxx git blame -L 5,10 XXX 指定5~10行
git reflog 默认保留30天 查找分支的SHA-1 分支只是一个指向某个Commit的指向标
非文本文件冲突 git checkout –ours xxxx git checkout –theirs xxxx
HEAD 缩写 @ ORIG_HEAD
手中任务做一半,临时切换别的任务
-
commit&reset git add –all git commit -m “not finished yet.” git reset HEAD^
-
stash git stash git stash list git stash pop stash@{2} git stash drop stash@{0} git stash apply stash@{0} pop — apply+drop
filter-branch refs/original/refs/heads/master
cherry-pick
git branch –remote / -r 显示远端分支 git remote -v
git push origin :cat 删除远端分支,推送空的内容更新在线cat分支内容,变相删除该分支。
git format-patch git am xxx
branch:
- master
- developer
- release
- feature
-
hotfix
github flow