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>]
I see your request is:
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:
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 point
git flow feature start <name> [<base>]