orphan branch

This commit is contained in:
Hemanth.HM 2016-04-10 21:07:36 +05:30
parent afa8747b07
commit 157337d356
2 changed files with 9 additions and 0 deletions

View File

@ -97,6 +97,7 @@
* [Instantly browse your working repository in gitweb.](https://github.com/git-tips/tips#instantly-browse-your-working-repository-in-gitweb)
* [View the GPG signatures in the commit log](https://github.com/git-tips/tips#view-the-gpg-signatures-in-the-commit-log)
* [Remove entry in the global config.](https://github.com/git-tips/tips#remove-entry-in-the-global-config)
* [Checkout a new branch without any history](https://github.com/git-tips/tips#checkout-a-new-branch-without-any-history)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -665,5 +666,10 @@ git log --show-signature
git config --global --unset <entry-name>
```
## Checkout a new branch without any history
```sh
git checkout --orphan <branch_name>
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -296,4 +296,7 @@
}, {
"title": "Remove entry in the global config.",
"tip": "git config --global --unset <entry-name>"
},{
"title": "Checkout a new branch without any history",
"tip": "git checkout --orphan <branch_name>"
}]