git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: question git & branches
Date: Mon, 29 Aug 2005 10:49:23 -0700	[thread overview]
Message-ID: <43134AA3.2010308@candelatech.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0508290754410.3243@g5.osdl.org>

Linus Torvalds wrote:
> 
> 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

> 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

  reply	other threads:[~2005-08-29 17:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-29  8:07 question git & branches Ben Greear
2005-08-29 11:27 ` Martin Langhoff
2005-08-29 12:15 ` Alex Riesen
2005-08-29 15:03 ` Linus Torvalds
2005-08-29 17:49   ` Ben Greear [this message]
2005-08-29 18:04     ` Linus Torvalds
2005-08-29 20:20   ` Jon Loeliger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43134AA3.2010308@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).