File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 97
97
* [ Instantly browse your working repository in gitweb.] ( https://github.com/git-tips/tips#instantly-browse-your-working-repository-in-gitweb )
98
98
* [ View the GPG signatures in the commit log] ( https://github.com/git-tips/tips#view-the-gpg-signatures-in-the-commit-log )
99
99
* [ Remove entry in the global config.] ( https://github.com/git-tips/tips#remove-entry-in-the-global-config )
100
+ * [ Checkout a new branch without any history] ( https://github.com/git-tips/tips#checkout-a-new-branch-without-any-history )
100
101
101
102
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
102
103
<!-- @doxie.inject end toc -->
@@ -665,5 +666,10 @@ git log --show-signature
665
666
git config --global --unset < entry-name>
666
667
```
667
668
669
+ ## Checkout a new branch without any history
670
+ ``` sh
671
+ git checkout --orphan < branch_name>
672
+ ```
673
+
668
674
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
669
675
<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 296
296
}, {
297
297
"title" : " Remove entry in the global config." ,
298
298
"tip" : " git config --global --unset <entry-name>"
299
+ },{
300
+ "title" : " Checkout a new branch without any history" ,
301
+ "tip" : " git checkout --orphan <branch_name>"
299
302
}]
You can’t perform that action at this time.
0 commit comments