Re: how to clone/checkout branch/tag vesion from GIT repository

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

 



On Thu, May 10, 2012 at 10:19:12AM -0400, Suchi Upadhyay wrote:

> 2- for branch:
> $ git checkout br6-1-0
> 
> Suchi - As per my understanding with GIT this command will create a
> new branch in my repository..for ex. If I run "git checkout suchi"
> then it will create suchi as a new branch.

Not exactly. It will do one of:

  1. If a local branch named br6-1-0 exists, it will be checked out.

  2. If a tag named br6-1-0 exists, then you will be put in a "detached
     HEAD" state, starting at the tag. See the "detached HEAD" section
     of "git help checkout" for details.

  3. If a remote branch named br6-1-0 exists, a local branch of the same
     name will be created, starting at the same spot.

  4. Otherwise, it is an error.

> Please note that  - branch br6-1-0 created in CVS and then our source
> code migrated to Git. But in migration output I can see the br6-1-0
> picked up for copying ...
> [...]
> Suchi - I want a branch list from remote. I have run your suggested
> command  but it shows only tag list and no branch.

>From the message you are seeing from "git clone -b", and from the output
of "ls-remote", it sounds like br6-1-0 really is a tag in git, not a
branch. Since you have said it is coming from CVS, I suspect this is an
artifact of the CVS->git conversion. And if that is not the desired
outcome, you should look into your conversion process (there are several
tools available; if you used git-cvsimport, it is generally considered
to to be the least accurate, and you might try cvs2git).

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