git - Can I orphan an existing branch? -
I have made some branches in the repo, and too late (after making various changes) that I want them Orphans have made it possible after the fact it is possible to orphan?
I'm sure this is possible. There may be a more efficient way, but it seems that it will work:
- Find the first job in your old branch, and call it on
first
. -
git checkout - orphan new-branch $ FIRST
-
git checkout old-branch
-
GIT Leak - FONTRIE New-branch $ FIRST
You now have the original branch on old-branch
and A new, orphan binding new branch
. If you want, you can either remove old-branch
or rename, and new-branch
to old-branch
Can change the name of
Comments
Post a Comment