tags 684169 + upstream
# documentation
severity 684169 minor
reassign 684169 git-doc 1:1.7.10.4-1
quit
Hi Mika,
Mika Suomalainen wrote:
> git checkout --orphan somebranch
> touch something
> git add something
>
> And all files from branch before somebranch are git added.
git-checkout(1) explains:
If you want to start a disconnected history that records a set
of paths that is totally different from the one of
<start_point>, then you should clear the index and the working
tree right after creating the orphan branch by running "git rm
-rf ." from the top level of the working tree. Afterwards you
will be ready to prepare your new files, repopulating the
working tree, by copying them from elsewhere, extracting a
tarball, etc.
When adding an independent branch like this, generally I prefer to
create a new, separate repository and fetch or push its refs with "git
fetch" or "git push".
Does that help? Do you remember which documentation promised
otherwise, so it can be clarified for the next person?
Thanks for your help,
Jonathan
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]