0
我下面這個tutorial,我感到困惑的快進合併例子,它具有以下功能:`git checkout -b新功能主控程序是做什麼的?
# Start a new feature
git checkout -b new-feature master
# Edit some files
git add <file>
git commit -m "Start a feature"
# Edit some files
git add <file>
git commit -m "Finish a feature"
# Merge in the new-feature branch
git checkout master
git merge new-feature
git branch -d new-feature
什麼是第二行嗎?與git checkout -b new-feature
有什麼不同?
哦,我以爲master是git的第四個參數。相反,「新功能大師」是第三位。 – jeff
@jeff:不,你是對的,'master'是一個單獨的(第四個)參數,'new-feature'是第三個參數。這只是新分支的一個可選起點。如果你省略了第四個參數,Git使用'HEAD'作爲起點。 – torek
@torek謝謝,所以它會從'master'創建一個名爲'new-feature'的新分支。 – jeff