git workflow 最佳的实践模式是什么?
某草草
某草草 2017-04-25 09:03:38
0
2
749

git workflow 通常会用到各个分支的工作流程。
比如已经在一个分支上进行一部分开发,又要再次分支上新建一个分支,让新分支的commit 记录为空,我建立的分支就是会带由原先分支记录的信息。如何更好的应用gitflow.

某草草
某草草

reply all(2)
滿天的星座

I see your request is:

Create a new branch on this branch and make the commit record of the new branch empty

If it is to be empty, then you can use "orphan branch" to achieve this. This git-flow should not provide the corresponding command.

The details are as follows:

$ git checkout --orphan <NEW_BRANCH_NAME>

The branch created in this way will contain all the files of the starting branch (that is, the branch where you execute the command), but all files will be in the same state. stage 的状态(意味着你可以有选择的决定新分支的第一次提交要包含哪些文件),并且历史记录也是完全空白的,就好像你刚执行过 git init

洪涛

I strongly object to newcomers using plug-ins like gitflow. If you don't understand the principles and try to take shortcuts, you will make things wrong.
https://github.com/nvie/gitflow#creating-featurereleasehotfixsupport-branches
The gitflow command provides an optional base parameter to specify the start pointgit flow feature start <name> [<base>]

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template