diff --git a/README.md b/README.md index 53eb393..4876efc 100644 --- a/README.md +++ b/README.md @@ -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) @@ -665,5 +666,10 @@ git log --show-signature git config --global --unset ``` +## Checkout a new branch without any history +```sh +git checkout --orphan +``` + diff --git a/tips.json b/tips.json index 332f546..f0959cf 100644 --- a/tips.json +++ b/tips.json @@ -296,4 +296,7 @@ }, { "title": "Remove entry in the global config.", "tip": "git config --global --unset " +},{ + "title": "Checkout a new branch without any history", + "tip": "git checkout --orphan " }]