git hilarity (was: Re: server-1.2-branch accidentally merged with master)

Michel Dänzer michel at tungstengraphics.com
Tue Oct 10 03:55:58 PDT 2006


On Tue, 2006-10-10 at 13:39 +0300, Daniel Stone wrote:
> On Tue, Oct 10, 2006 at 10:57:08AM +0200, Michel Dänzer wrote:
> > 
> > Also beware that
> > 
> > git-push <remote>
> > 
> > without further arguments will push all local commits on all branches
> > referenced in .git/remotes/<remote>, so it's safer to use
> > 
> > git-push <remote> <branch>
> 
> While we're here, a couple of things I'd like to know:
>   * What's the syntax for 'diff remote branch foo to mine'?  I was
>     trying to diff origin:input-hotplug to .:input-hotplug the other
>     day, and couldn't work out how.  ('gitk' is not the answer I'm
>     looking for here.)

I don't know of any way to do that. For this and other reasons, it's
useful to use the origin/master scheme for other shared branches as well
(e.g. pulling the remote branch <branch> into the local branch
<branch>-origin and (re)basing the local branch <branch> on that).

>   * I thought git push <remote> only pushed branches marked with Push in
>     .git/remotes/<remote>, such that Push x:y will push local branch x
>     to remote branch y when git push <remote> is invoked.  Is this
>     correct?

Only if you have any Push lines. From the git-push manpage:

          Note: If no explicit refspec is found, (that is neither on the
          command line nor in any Push line of the corresponding remotes
          file---see below), then all the refs that exist both on the
local
          side and on the remote side are updated.

Even if you have push lines, you might not want to push them all at any
time.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer




More information about the xorg mailing list