Re: Git documentation on branching.
- Date: Mon, 10 Apr 2017 12:21:10 +0200
- From: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
- Subject: Re: Git documentation on branching.
On Mon, Apr 10, 2017 at 8:56 AM, Samuel Åslund <samuel@xxxxxxxxxxxx> wrote:
> Hi all.
> I just started playing around with branching in git.
> I have been using it more or less as Subversion until now.
> One feature with "git branch xyz" and "git checkout xyz" that is rather
> obvious if you know them but bit me a little since I did not, is that
> uncommitted work in progress is not affected or saved when switching between
> branches. Thus I cleaned up the directory when working with the branch and
> now I'm trying to find a stash where I hopefully have a copy of those files.
> Would it be possible to add something in the documentation to warn others
> that uncommitted work is not saved or affected by branching?
The main UI in git for switching branches is "git checkout", and it's
mentioned in the second paragraph of the documentation:
"[when switching branches] local modifications to the files in the
working tree are kept, so that they can be committed to the
Did you read this and find it unclear, and if so can you elaborate on
what the confusion was, maybe we can fix the docs with that in mind?
Or did you read some entirely different docs (what docs?) where we're
perhaps not mentioning this as prominently?
> The first two hits on my google search was very informative about branching
> but I did not see that specific nugget of information (I might have been
> careless reading, but if I did not see it others will probably also miss
> Git - git-branch Documentation
> Git - Branches in a Nutshell
> This is my first try to contribute to the Git community, I hope it will be
> useful to somebody.