question concerning branches

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

 



I'm a git novice and have a comprehension question concerning branches.

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!

If I continue now working in the master branch (applying patches and such) I
will use a changed foo.bar with testing branch content. I can't even apply
patches to foo.bar without conflict.

Of what use are branches if the files aren't totally separated from each
other?

What must I do to get a test branch I can't work without affecting master?

Ingo
--
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]