On Mon, Jul 23, 2012 at 05:15:15PM -0700, Diego Elio Pettenò wrote:
> Il 23/07/2012 17:03, Diego Biurrun ha scritto:
> >   I'm not entirely sure if I should have
> > expected that or not.
> 
> You should. That's why it's best to work on a branch and only add to
> master when you intend to push it.
> 
> Since your master tracks origin/master both ways, a git push to origin
> _will_ push master unless you specifically says it not to (and I
> honestly forgot how).
> 
> So...
> 
> git checkout -b dondiego origin/master
> $doyourstuff
> 
> when it's time to push something
> 
> git checkout master
> git am < $file
> git push master
> 
> There, you're set :P

Yes, working on topic branches *always* and only using master to push
is surely more advisable.

One could also defensively set

  git config --global push.default nothing

or add the equivalent to ~/.gitconfig

  [push]
          default = nothing

to require explicit naming of branches to push.  Just setting the
push default to "tracking" should also help.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to