注意:我不確定是否已經提出這個問題,因爲我找不到符合我的上下文(或I)的任何問題我無法理解現有問題的背景「)Git:無法理解主分支上發生分支(主題)提交/合併的原因
我很喜歡Git這些天。特別是,話題分支。我正在研究一個小型代碼共享應用程序。我有(主),「認證」,「書籤」,「評論」,「鼻子」等(本地)分支...
我的(打算)工作流程如下所示:創建主題分支==>處理主題分支==>將文件提交到分支==>將主題分支更改合併到「主」分支。 (後來刪除主題分支)
我試着做同樣的幾個分支。它運行良好。但後來當我檢查git圖時,即使我遵循相同的工作流程,所有機會都發生在「主」上。沒有樹線分歧和聚合!它從那時起顯示了一條帶有多個提交的單線。我不知道爲什麼?我的印象是,我用頭指針擰了一些東西?
舉一個實際的看法,這是我的git圖:http://github.com/none-da/zeshare/network
下面是我使用的命令:
>> git branch authentication_feature
>> git checkout authentication_feature
>> # I work with all the files here in "authentication_feature" branch
>> git commit -m "Authentication_feature is up" # commiting to the branch
>> git branch # just to confirm, which branch I am working on
>> git checkout master # trying to shift to master branch
>> git merge --no-commit authentication_feature # I merge in two steps. This is step 1
>> git status;git add; git commit -m "Authentication_feature" merged to "master". # This is the step 2
>> git log --graph --pretty=oneline # confirming the graph
>> git push origin master # pushing to the remote server(github)
您的鏈接不適合我。你是如何創建分支的?我想我們需要更多的信息,比如你使用的命令。 – 2010-02-04 02:44:39
恐怕沒有足夠的答案細節(鏈接超時),請確保遵循任何教程/手冊並查看是否得到相同的結果。選中您進行更改的分支等等。 – stefanB 2010-02-04 02:52:34