-
-
Save Mr-Kumar-Abhishek/db1e6803fd89bdcde0d637d92c4a2ee6 to your computer and use it in GitHub Desktop.
Revisions
-
ozh renamed this gist
Feb 7, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ozh created this gist
Feb 7, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ ``` $ git checkout --orphan NEWBRANCH $ git rm -rf . ``` `--orphan` creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry. You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.