Create an orphan branch i.e. branch with no parent commit
suggest changegit checkout --orphan new-orphan-branch
The first commit made on this new branch has no parents. It is the root of a history disconnected from the other branches. git checkout --orphan keeps the current index and working tree, so clear them before you commit if the new root should not contain those files. You are not in detached HEAD; you are on the new branch, which does not exist until that first commit.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents