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 9797* [ Instantly browse your working repository in gitweb.] ( https://github.com/git-tips/tips#instantly-browse-your-working-repository-in-gitweb )
9898* [ View the GPG signatures in the commit log] ( https://github.com/git-tips/tips#view-the-gpg-signatures-in-the-commit-log )
9999* [ 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 )
100101
101102<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
102103<!-- @doxie.inject end toc -->
@@ -665,5 +666,10 @@ git log --show-signature
665666git config --global --unset < entry-name>
666667```
667668
669+ ## Checkout a new branch without any history
670+ ``` sh
671+ git checkout --orphan < branch_name>
672+ ```
673+
668674<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
669675<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 296296}, {
297297 "title" : " Remove entry in the global config." ,
298298 "tip" : " git config --global --unset <entry-name>"
299+ },{
300+ "title" : " Checkout a new branch without any history" ,
301+ "tip" : " git checkout --orphan <branch_name>"
299302}]
You can’t perform that action at this time.
0 commit comments