Thread (58 messages) flat view 58 messages, 29 authors, 2016-08-11

Re: GIT vs Other: Need argument

From: Carl Worth <hidden>
Date: 2016-06-15 22:43:06

On Thu, 19 Apr 2007 13:57:35 -0700 (PDT), Linus Torvalds wrote:
 - Case #1 would be using git basically as a "anonymous CVS" replacement
   to track somebody others project.
I'd extend this to also say "tracking a specific branch" in some
project.

When I raised this recently, Junio suggested something like the
following:

	git config --global branch.autosetupmerge true	[*]
	git clone <URL>
	git checkout -b <branch> origin/<branch>
	git pull

I haven't gotten around to replying to that message yet, but the
thrust of my reply would be that that does actually work, but it's not
even close to the ease with which one can track the default branch as
Linus described:
   None of the above are ever really needed for that case, and I think all
   you really want to learn is:

	git clone
	git pull
So, currently, all non-default branches have a sort of second-class
status from the point of view of users that just want to track
them.

Compare this to svn, for example. Now, svn has an insanely broken
model for what a branch actually is, while git's model is sane.  But I
think that with svn the "anonymously tracking a branch" use case isn't
any harder for any one branch compared to any other, (it's just a
matter of starting with the right URL). I'd love to see git achieve
the same thing.

-Carl

[*] Is the command I have above even correct? What Junio actually
suggested was:

	$ cat >>$HOME/.gitconfig <<\EOF
	[branch]
		autosetupmerge
	EOF

But I can't find a way to use git-config create a block that looks
like that. I'm just guessing that "autosetupmerge = true" works
equivalently, but I could be wildly wrong.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help