Create an orphan branch i.e. branch with no parent commit

suggest change
git 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.

source

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents