Re: question concerning branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 19, 2009 at 5:33 PM, Ingo Brueckl<ib@xxxxxxxxxxxxxxx> wrote:
> Within a git repository, I do:
>
>  git branch test
>  git checkout test
>  # edit foo.bar
>  git checkout master
>
> I'd expect that master is in the exactly same unchanged state it was at
> branching time, but what a surprise, foo.bar is modified here, too!

You seem to have forgotten the "git commit" step before switching back
to master.  You have a modified file in your repository; what did you
*want* to happen when you switched branches?  (Many people find the
current behaviour very convenient.)

You might also want to look at the "git stash" command.

Avery
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]