【发布时间】:2014-11-15 20:35:51
【问题描述】:
关于如何更改push命令的参数以避免出现此消息的SO有一个相关问题:
fatal: The upstream branch of your current branch does not match the name of your current branch
我对如何压制消息本身很感兴趣, 无需更改本地/远程分支的名称或使用花哨的push 命令。
假设我有一个本地分支跟踪一个不同名称的远程分支:
user@home:~ git branch -vv
branch-name abcd1234 [remote/origin/branch-name] last commit message
现在我希望能够通过简单地输入 git push 来推送我已提交的更改。当我这样做时,我收到以下消息:
fatal: The upstream branch of your current branch does not match the name of your current branch. To push to the upstream branch on the remote, use git push origin HEAD:remote/origin/branch-name To push to the branch of the same name on the remote, use git push origin branch-name
即使名称不匹配,如何强制git 自动推送到上游分支?我正在使用git 1.9.1
【问题讨论】:
标签: git