git 分支对我来说非常混乱(创建新分支、功能)
git branches are very confusing for me (creating new branches, features)
我尝试在 GIT 中创建功能分支。
我想创造什么
A -- B -- C ------ D
\
E --
第一行是开发,第二行是功能分支。
我需要如何创建功能分支?像这样?
git checkout -d myFeature
更改文件后:
git add .
git commit -m "My awesome commit"
然后推送
git push origin myFeature
合并到开发分支
git merge myFeature
然后提交并再次推送。这是正确的方法吗?
可以从提交创建分支吗?
GIT 中的 --track 标志是什么意思,我什么时候需要使用它?
分支和origin/branch有什么区别?
有人可以向我解释一下分支吗?
How I need to create feature branch?
如果您尝试从提交哈希创建 myFeature
分支 B
git checkout -b myFeature B
注意您发布的问题中的语法错误error: unknown switch 'd'
Merge in dev branch
不要忘记首先检查您的 dev
分支 ,然后合并 myFeature
git checkout dev
git merge myFeature
And then commit and push again. Is this a right way?
无需再次提交,成功的合并将创建提交。
Can a branch created from commit?
是,如第 1 步所示
What means --track flag in GIT and when i need to use it?
我会推荐给你the git branch
documentation
-t, --track
When creating a new branch, set up branch.<name>.remote and branch.<name>.merge configuration
entries to mark the start-point branch as "upstream" from the new branch. This configuration will
tell git to show the relationship between the two branches in git status and git branch -v.
Furthermore, it directs git pull without arguments to pull from the upstream when the new branch
is checked out.
This behavior is the default when the start point is a remote-tracking branch. Set the
branch.autoSetupMerge configuration variable to false if you want git checkout and git branch to
always behave as if --no-track were given. Set it to always if you want this behavior when the
start-point is either a local or remote-tracking branch.
What is the difference between branch and origin/branch?
branch
应该是指您的本地副本,origin/branch
是指远程服务器上的副本。
Can somebody explain me about branches?
这对于 SO 来说太宽泛了,但这里是 a wonderful free interactive tutorial that should answer this for you in addition to the git book and the aforementioned git branch
documentation。
我尝试在 GIT 中创建功能分支。 我想创造什么
A -- B -- C ------ D
\
E --
第一行是开发,第二行是功能分支。
我需要如何创建功能分支?像这样?
git checkout -d myFeature
更改文件后:
git add .
git commit -m "My awesome commit"
然后推送
git push origin myFeature
合并到开发分支
git merge myFeature
然后提交并再次推送。这是正确的方法吗?
可以从提交创建分支吗?
GIT 中的 --track 标志是什么意思,我什么时候需要使用它?
分支和origin/branch有什么区别?
有人可以向我解释一下分支吗?
How I need to create feature branch?
如果您尝试从提交哈希创建 myFeature
分支 B
git checkout -b myFeature B
注意您发布的问题中的语法错误error: unknown switch 'd'
Merge in dev branch
不要忘记首先检查您的 dev
分支 ,然后合并 myFeature
git checkout dev
git merge myFeature
And then commit and push again. Is this a right way?
无需再次提交,成功的合并将创建提交。
Can a branch created from commit?
是,如第 1 步所示
What means --track flag in GIT and when i need to use it?
我会推荐给你the git branch
documentation
-t, --track
When creating a new branch, set up branch.<name>.remote and branch.<name>.merge configuration
entries to mark the start-point branch as "upstream" from the new branch. This configuration will
tell git to show the relationship between the two branches in git status and git branch -v.
Furthermore, it directs git pull without arguments to pull from the upstream when the new branch
is checked out.
This behavior is the default when the start point is a remote-tracking branch. Set the
branch.autoSetupMerge configuration variable to false if you want git checkout and git branch to
always behave as if --no-track were given. Set it to always if you want this behavior when the
start-point is either a local or remote-tracking branch.
What is the difference between branch and origin/branch?
branch
应该是指您的本地副本,origin/branch
是指远程服务器上的副本。
Can somebody explain me about branches?
这对于 SO 来说太宽泛了,但这里是 a wonderful free interactive tutorial that should answer this for you in addition to the git book and the aforementioned git branch
documentation。