'git checkout-b new feature master'做什么?
我遵循这一点,但对快进合并示例感到困惑,在该示例中,它执行以下操作:'git checkout-b new feature master'做什么?,git,git-merge,Git,Git Merge,我遵循这一点,但对快进合并示例感到困惑,在该示例中,它执行以下操作: # 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
# 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签出-b新功能主控程序
#编辑一些文件
git添加
git commit-m“启动特性”
#编辑一些文件
git添加
git commit-m“完成一个特性”
#合并到新要素分支中
切换到主分支
git合并新特性
git分支-d新特性
第二行是做什么的?它与git checkout-b新功能有何不同
git checkout -b new-feature master
将从master
创建名为new feature master
的新分支,并签出该新分支
有关更多信息,请查看:
git checkout -b|-B <new_branch> [<start point>]
git checkout-b |-b[]
如果省略了
,则当前分支将用作起点。命令
git checkout -b new-feature master
将从master
创建名为new feature master
的新分支,并签出该新分支
有关更多信息,请查看:
git checkout -b|-B <new_branch> [<start point>]
git checkout-b |-b[]
如果省略
,则当前分支将用作起点。哦,我认为master
是git
的第四个参数。相反,newfeaturemaster
是第三个参数。@jeff:不,你说得对,master
是一个单独的(第四个)参数,newfeature
是第三个参数。这只是新分支的可选起点。如果忽略第四个参数,Git将使用HEAD
作为起点。@torek谢谢,因此它将从master
@Jeff创建一个名为新功能
的新分支,并且它还将签出并切换到该新分支新功能
。噢,我认为master
是git
的第四个参数。相反,newfeaturemaster
是第三个参数。@jeff:不,你说得对,master
是一个单独的(第四个)参数,newfeature
是第三个参数。这只是新分支的可选起点。如果省略第四个参数,Git将使用HEAD
作为起点。@torek谢谢,因此它将从master
@Jeff创建一个名为new feature
的新分支,并将签出并切换到该新分支new feature
。