- 配置core.excludesfile,该文件中记录了需要忽略的文件列表
- ~/.config/git/ignore
- repo库中的info/exclude
- commit树中的.gitignore
更多详情可参考官方文档:
https://git-scm.com/docs/gitignore
更多详情可参考官方文档:
https://git-scm.com/docs/gitignore
git branch <localbranch> [--track] <remote>/<branch>
起点为远程分支时--track
可省略。
git checkout <branch> # 只有一个remote时,自动追踪remote同名分支
git checkout --track <remote>/<branch> # 使用远程分支名称作为本地分支名
git checkout -b <localbranch> [--track] <remote>/<branch> # 指定本地分支名称,起点为远程分支时--track可省略
git branch -u <remote>/<branch> [<localbranch>]
省略localbranch时使用当前branch。
git push -u <remote> <localbranch>:<remotebranch>
git push -u <remote> <branch> #本地branch名称与远程相同
https://segmentfault.com/a/1190000002783245
unset SSH_ASKPASS