2016-10-24 27 views
0

我創建了一個新的分支,做了一些工作,去提交它(第一次提交這個分支),只得到錯誤:Git說「不能提交,你不在正確的分支」即使我是?

Execution of target "commit" failed for the following reason: You are not on the correct branch.

會有人知道爲什麼發生這種情況,如果能解決嗎?

Git的狀態:

# On branch my_branch 
# Changes to be committed: 
# (use "git reset HEAD <file>..." to unstage) 
# 
#  modified: myfile.php 
# 
+1

你可以在這裏發佈你的'git status'嗎? –

+0

Upvoted想出一個我從未見過的。 – matt

+0

@PhilipTzou我在上面添加了它。注意狀態中的分支是正確的。 – MeltingDog

回答

0

沒有確切的答案,但我切換到同一分支,它現在的作品。奇怪的。

相關問題