2013-03-25 40 views
0

任何人都可以理解以下命令和輸出序列嗎?我對Git的工作方式有什麼誤解(或者這是Git中的錯誤)?爲什麼「git branch --merged」報告不準確?

[email protected]:~/projects/this$ git branch 
    master 
* release-2.7.0 

[email protected]:~/projects/this$ git merge master 
Already up-to-date. 

[email protected]:~/projects/this$ git branch --merged master 
    master 

[email protected]:~/projects/this$ git branch --no-merged master 
* release-2.7.0 

分支顯然已經合併到發佈-2.7.0,你可以在我試圖合併它的第二個命令看,和git迴應說,它已經上TO-日期。我可以通過查看存儲庫的Git日誌和文件內容來手動確認分支確實已合併。

感謝您的意見。

回答

3

master清楚地合併到release-2.7.0而不是周圍的其他方法使git branch --merged master不會列出release-2.7.0release-2.7.0是不是從master尖端到達。

git help branch

--merged [<commit>] 
    Only list branches whose tips are reachable from the specified commit (HEAD if not specified). 
+0

感謝。我頭腦裏落後了 - 'merged'的感覺。我想要的是「 - 包含」。 – ScottSB 2013-03-25 21:40:10

相關問題