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

[gits] Two Branches, same name



	Leigh> Okay, say there is a branch off emulab-devel called aptui. Then
	Leigh> say someone else (Keith) has a branch in his repo with the same
	Leigh> name.  How do I deal with this, since git says I already have a
	Leigh> branch aptui and will not let me track another one (I am on
	Leigh> master when I try this).

You can pull Keith's branch and give it a different name in your local
repository.  For example, suppose you want to call your copy of his branch
"kaptui":

	git remote add kdownie git-public.flux.utah.edu:/blah/blah/blah

	# Make a branch "kaptui", tracking remote "kdownie/aptui", and
	# swicth to the "kaptui" branch.
	
	git checkout -b kaptui kdownie/aptui

See http://git-scm.com/book/en/Git-Branching-Remote-Branches#Tracking-Branches

Of course, you could ask Keith to rename his branch, too :-).  But what fun
would that be?

Eric.

-- 
-------------------------------------------------------------------------------
Eric Eide <eeide at cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX