From: Junio C Hamano <junkio@cox.net>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Switching heads and head vs branch after CVS import
Date: Sun, 14 Aug 2005 17:40:15 -0700 [thread overview]
Message-ID: <7vmznkav80.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <46a038f905081417241f9598cc@mail.gmail.com> (Martin Langhoff's message of "Mon, 15 Aug 2005 12:24:30 +1200")
Martin Langhoff <martin.langhoff@gmail.com> writes:
> After having done a cvs import of Moodle using git-cvsimport-script
> all the cvs branches show up as heads. How do I switch heads within a
> checkout? cogito doesn't seem to be able to, and I'm unsure on how to
> do it with git.
The documentation may be quite sketchy on this front.
I do not speak for Pasky, so Cogito may treat them a little
differently, but at the core GIT level, you can treat branches
and heads synonymously.
What you have recorded in .git/refs/heads/frotz file is the SHA1
object name of the commit that is at the top of "frotz" branch.
When your .git/HEAD symlink points at refs/heads/nitfol, your
working tree is said to be on "nitfol" branch.
You switch branches by using "git checkout". You can create a
new branch using "git checkout -b newbranch commit-id". You
examine which branch you are on by "readlink .git/HEAD". As you
already found out, you can merge branches with "git resolve
master other-branch 'comment'". The last one is briefly covered
by the tutorial.
next prev parent reply other threads:[~2005-08-15 0:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 0:24 Switching heads and head vs branch after CVS import Martin Langhoff
2005-08-15 0:40 ` Junio C Hamano [this message]
2005-08-15 0:46 ` Linus Torvalds
2005-08-15 2:05 ` Martin Langhoff
2005-08-15 2:49 ` Linus Torvalds
2005-08-15 8:22 ` Sven Verdoolaege
2005-08-15 9:07 ` Matthias Urlichs
2005-08-15 9:48 ` Martin Langhoff
2005-08-15 8:09 ` Wolfgang Denk
2005-08-15 10:38 ` Matthias Urlichs
2005-08-15 11:45 ` Sven Verdoolaege
2005-08-15 16:42 ` Linus Torvalds
2005-08-15 20:09 ` Martin Langhoff
2005-08-15 20:22 ` Wolfgang Denk
2005-08-15 22:37 ` Linus Torvalds
2005-08-15 22:53 ` Johannes Schindelin
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=7vmznkav80.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=martin.langhoff@gmail.com \
/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).