RE: git branch

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

 



> From: gbuday@xxxxxxxxx
>
> > I'm not sure if I'm following you correctly, but with Git you need to
> > check out your branch after creating it. Run git checkout install_2.0
> > after you have created it.
>
> Yes, that sounds reasonable. I did not know it was necessary to "switch to it".
>
> - Gergely


Hi Gergely,

The way that git branches work is that they "point" at commits.
When you do a "git commit", git updates the branch to point at
the new commit you just created. In this way, you can have a
multitude of branches and be working on only one at a time.

N.B. If you want to create a branch and "switch" (checkout) to
it at once, you can pass the "-b" option to checkout, thus:
"git checkout -b new-branch-name"; this will create a new branch
named "new-branch-name" and immediately switch to it.


Tim.

() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
 		 	   		  --
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]