Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
'git checkout-b new feature master'做什么?_Git_Git Merge - Fatal编程技术网

'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