Re: question git & branches
- From
- Ben Greear <greearb@candelatech.com>
- Date
- Aug 29, 2005, 17:49 UTC
- Message-ID
- <43134AA3.2010308@candelatech.com>
- In-Reply-To
- <Pine.LNX.4.58.0508290754410.3243@g5.osdl.org>
Linus Torvalds wrote:
Show 12 quoted lines
> > On Mon, 29 Aug 2005, Ben Greear wrote: > >>I think I'm missing something fundamental though... I wanted to >>change to the ben_dev_rfcnt branch to build a kernel without my >>additional patch. git branch ben_dev_rfcnt seems to change >>it fine, but all of the changes for repository 'foo' are also >>still here. > > > "git branch" just creates the branch, it doesn't actually do anything > else. Use "git checkout <branchname>" to switch to it.
I tried 'git checkout ben_dev_rfcnt'. It took a few seconds and had no errors. But, the files created on my other branch still exist in the code tree, and I still see my patch in the existing files.. I would expect them to go away.
I don't think I've managed to commit anything to any branch yet... Could that be part of the problem?
I tried gitk -all, and get this error popup:
Gitk: error reading commits: bad arguments to git-rev-list. (Note: arguments to gitk are passed to git-rev-list to allow selection of commits to be displayed.)
Thanks, Ben
Show 19 quoted lines
> You can do both with "bit checkout -b <branchname>" which both creates the > branch and switches to it. > > (Both "git branch" and "git checkout -b <branchname>" that reate a new > branch take an optional argument which says what point you want the branch > to start at. It defaults to "current state", but you can create a branch > at any point in the history by just explicitly stating the commit name > that you want to start off with as the head of the branch) > > Use "gitk --all" to visualize where the different branches are in the > history, and a plain "git branch" with no arguments to list the branches > and mark your currently active branch. > > Linus > - > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
-- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com