Re: Bootstrapping into git, commit gripes at me
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jul 12, 2005, 03:09 UTC
- Message-ID
- <Pine.LNX.4.58.0507112005540.17536@g5.osdl.org>
- In-Reply-To
- <20050712021004.GA27576@buici.com>
On Mon, 11 Jul 2005, Marc Singer wrote:
> > From my POV, what I want is a branch with the tag v2.6.12 as the basis > of the branch. I'm guessing that -b means "make me a branch and call > it this".
Yup. That would be the interface.
> # git checkout -b BRANCH_NAME [TAG] > > If the TAG is omitted, the branch is made from the current HEAD or > some other reasonable point defined by the current working directory.
That would be the most natural thing that would fall out of this kind of interface.
> Are uncommitted changes present in the working directory maintained? > Discarded? I wont't care since I'll never be doing that. At least, > not on purpose.
They'd be maintained. If they clash with the target being checked out (ie the checked-out tag would have changes to those files) it would error out with a "I can't do that, Dave".
Unless you give the "-f" flag, in which case they're all thrown out, and "git checkout" will force the new state and throw away any old state entirely.
Linus