分支情況:
dev
location
* master
new
操作的時候使用指令:
git merge location
然後會出現commit message的註解
請問各位是什麼地方出錯了?
phpcn_u15822017-04-25 09:05:34
沒有錯…
如果你使用git help merge
,就会看到git merge
的文檔。
然後它提到:
Then "git merge topic" will replay the changes made on the topic branch since it perged from master (i.e., E) until its current commit (C) on top of master,and record the resultil its current commit (C) on top of master,and record the result in a new name along of the two parent commits and a log message from the user describing the changes.
merge前
A---B---C topic
/
D---E---F---G master
merge後
A---B---C topic
/ \
D---E---F---G---H master
所以說,那個commit message是自動加入的。
如果你實在討厭這個commit,可以在merge時加上--no-commit
。這樣就不會產生commit message了。不過我不推薦這麼做,這樣的話,就不容易分辨merge的結果了。