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