diff options
author | Erick Mattos <erick.mattos@gmail.com> | 2010-03-21 12:34:38 -0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-21 16:43:30 -0700 |
commit | 9db5ebf4022d8e11ac20e75a3d43af161b752fcd (patch) | |
tree | e1edfca2c85bb339eb7c0234cd85fea9f7ebe141 /git-sh-setup.sh | |
parent | Merge branch 'maint' (diff) | |
download | tgif-9db5ebf4022d8e11ac20e75a3d43af161b752fcd.tar.xz |
git checkout: create unparented branch by --orphan
Similar to -b, --orphan creates a new branch, but it starts without any
commit. After running "git checkout --orphan newbranch", you are on a
new branch "newbranch", and the first commit you create from this state
will start a new history without any ancestry.
"git checkout --orphan" keeps the index and the working tree files
intact in order to make it convenient for creating a new history whose
trees resemble the ones from the original branch.
When creating a branch whose trees have no resemblance to the ones from
the original branch, it may be easier to start work on the new branch by
untracking and removing all working tree files that came from the
original branch, by running a 'git rm -rf .' immediately after running
"checkout --orphan".
Signed-off-by: Erick Mattos <erick.mattos@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-sh-setup.sh')
0 files changed, 0 insertions, 0 deletions