Git split inital commit into 2

My repository has one branch and several different commits. The initial commit contains some code. I want to create a request to migrate the current branch, but to an earlier version, then the initial commit so that I can see all the relevant code that has been added. How can I split the commit by 2?

+4
source share
1 answer

You can follow the procedure described in this answer to “How to split the previous commit into several commits” , except that you need to add a switch --root, since you want to change the first commit in your branch.

From the documentation :

-
, <branch> , < > . .

, master, :

git checkout master
git rebase -i --root
+4

Source: https://habr.com/ru/post/1665199/


All Articles