git使用总结

git fetch <remote> <remote_branch>:<local_branch_name>
git checkout <local_branch_name>

clone一个项目时,同时同步submodule:

git clone <url> <path> && cd <path>
git submodule init
git submodule update

另一种:git clone <url> <path> --recurse-submodules

git config:

[format]
    pretty = "%C(reset)%ai %C(Yellow)%h %C(reset)%s (%C(Green)%cr %C(Cyan)%an%C(reset))"

按时间倒序列出分支 git branch --sort=-committerdate

#pre-commit 工具

https://pre-commit.com/

配置参考:https://github.com/mengboy/pre-commit-golang

2021-07-07 16:18:08 +0800 yajw Update 2021-03-27 git使用总结.md M
2021-06-29 15:32:09 +0800 yajw Update 2021-03-27 git使用总结.md M
2021-03-27 14:49:15 +0800 yajw Copy old posts A