From 157337d356bbc15877f365bd9cf88b136b8f1be7 Mon Sep 17 00:00:00 2001 From: "Hemanth.HM" Date: Sun, 10 Apr 2016 21:07:36 +0530 Subject: [PATCH] orphan branch --- README.md | 6 ++++++ tips.json | 3 +++ 2 files changed, 9 insertions(+) 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 " }]