Subject: Re: Newbie grief

From: Rich Pixley <[email-masked]>
Date: Tue, 01 May 2012 14:29:52 -0700

On 5/1/12 14:05 , Randal L. Schwartz wrote:
>>>>>> "Rich" == Rich Pixley<[email-masked]>  writes:
>
> Rich>  I want to be able to fetch changes to the branch I currently have checked out.
> Rich>  Git blocks this because it doesn't know how to cope with the working directory
> Rich>  in that situation.
>
> It does?

Yes, it does.

> I can always "git fetch origin" in my repo, and the remote
> branches are in "origin/master, origin/foo, origin/bar".  Totally
> separate from my working tree.

Sure.  You can fetch other branches, (unless you happen to be checked 
out from them).  But you can't fetch to master if you're checked out 
from master.

> So, make a set of related names for your branches.  It's better with
> names anyway.

I disagree.  They only even need branches if they're different.  And the 
branches can be extremely lightweight.  With names, I have to manually 
track a geometric explosion of extraneous branches and branch names, 
just in order to be able to sync changes back and forth.  That's all 
work that could be managed automatically by the source code control system.

> Rich>  Pushing is blocked in git.  Git simply refuses some push requests
> Rich>  which have obvious and fairly straightforward semantics.
>
>   git push master:from-merlyn/master
>
> And now someone can look at "from-merlyn/master", and know that it's
> from me, and related to master, and either incorporate it into the real
> master, or cherry-pick from it, or whatever.  Solved.

Again, yes, you can push to other branches.  You could push to other 
repositories too.  That's not really what I'm talking about.

> You're asking a lot of an automated system.  I think you're trying to
> get a system to replace the communication you should be doing as a
> developer.

I hear that that's what you think.  But really, I'm asking for 
automation to replace the automation I already have in preexisting 
source code control systems.

There are a number of situations, like the ones I've described, that git 
just plain doesn't cope well with.  Other source code control systems 
have, and going backwards seems silly and frustrating.

My particular situation is that I'm developing a "feature" and to do 
that, I need to be testing on multiple machines.  Tens of them.  I 
really don't want hundreds of named branches that I must manually merge 
from constantly.

With mercurial or monotone or even subversion, it's trivial.  Branches 
can be shared.  And pushing between them is similarly trivial.  It can 
be done in seconds.  With git, it takes hours to do all the manual 
moves, track the manual moves manually, verify that they've been done 
correctly, and then later it takes hours to correct the ones that were 
done incorrectly because they were all done manually or because one 
machine happened to be down at the time and so got the changes in the 
wrong order, or whatever.

I'm not asking for anything new.  I'm asking for something that's as 
capable as what we've had for years now.

--rich