From c32e78944667d543764b5bdbfbc7f58610e9bcf5 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Mon, 6 Oct 2014 14:00:38 -0400 Subject: [PATCH] Add steps to insert a new root commit. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 2e13e3d..a545967 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,14 @@ $ git filter-branch \ ' \ HEAD ``` + + +Inserting a new root commit +--------------------------- +```sh +git checkout --orphan $TEMP_BRANCH +git rm -rf . +git commit --allow-empty -m $INIT_COMMIT_MSG +git rebase --onto $TEMP_BRANCH --root $MAIN_BRANCH +git branch -d $TEMP_BRANCH +``` -- 2.20.1