4
有上如何改变push
命令的参数,使处理来避免这个消息的相关问题:如何禁止“致命的:当前分支的上游分支与当前分支的名称不匹配”?
fatal: The upstream branch of your current branch does not match the name of your current branch
我感兴趣的是如何压制消息本身,没有改变我的本地/远程分支的名称或使用花式push
命令。
假设我有一个本地分支跟踪不同名称的远程分支:
[email protected]:~ git branch -vv
branch-name abcd1234 [remote/origin/branch-name] last commit message
现在我希望能够通过简单地键入git push
推我COMMITED变化。当我这样做,我得到以下信息:
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 push'并得到相同的消息。 – arman 2014-09-21 22:52:21
查看存储库.git/config文件或系统中是否存在冲突的设置/ etc/gitconfig – 2014-09-21 22:56:52
tracking最好似乎是可疑的:列出的5个可能值是'current','matching', 'nothing','simple'和'upstream'。在这种情况下,“上游”似乎是最有可能的期望之一。跟踪和上游的 – torek 2014-09-22 00:32:35