常用形式
git push origin +<src>:<des>
git push origin <src>:<des>
git push origin <src>(If :<dst> is omitted, the same ref as <src> will be updated)
git push origin :<des> (delete remote branch)
git push origin --delete <des>(delete remote branch)
git push origin : (使用matching模式)
for every branch that exists on the local side, the remote side is updated
if a branch of the same name already exists on the remote side
缺省行为
缺少<repository>时:
1 branch.*.remote
2 origin(缺省)
缺少<refspec>时:
1 remote.*.push
2 push.default(matching or simple)
相关配置
git config remote.origin.push HEAD
git config push.default simple( or matching )