以下命令只需知道其存在,到了真正需要用到的时候再查询其帮助也不迟。
一些复杂的Git操作需要利用xargs。而Git提供了一些化简的办法。
git for-each-ref - 对每个引用进行处理(比git show-ref更灵活)
git for-each-ref
git show-ref
git filter-branch - 对每个commit进行处理(比git rebase更灵活)
git filter-branch
git rebase
git submodule foreach --recursive - 对每个submodule进行处理
git submodule foreach --recursive
git bisect - 二分查找法定位bug位于哪个commit
git bisect
vim .git/hooks/pre-commit - 在commit前做检查
vim .git/hooks/pre-commit
vim .git/hooks/commit-msg - 自动撰写commit message
vim .git/hooks/commit-msg
vim .git/hooks/pre-push - 在push前做检查
vim .git/hooks/pre-push
vim .git/hooks/...
git config --global core.autocrlf true|false|input
git stripspace
git config --global core.whitespace ...
最后更新于5年前