Re: Using the --track option when creating a branch

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

 



[Cc: Samuel Tardieu <sam@xxxxxxxxxxx>, Andreas Ericsson <ae@xxxxxx>,
     git@xxxxxxxxxxxxxxx]

Samuel Tardieu wrote:
> * Andreas Ericsson <ae@xxxxxx> [2008-10-30 15:06:16 +0100]
> 
>> --all pushes all refs, even the non-matching ones, which is very
>> rarely desirable and only accidentally sometimes the same as "push all
>> matching refs".
>>
>>> I know that I've never had the intent to push all the refs without
>>> thinking about it first. Most of the time, I intend to push only
>>> the current branch I am in.
>>
>> Then say so. There's a very simple command syntax for it:
>> "git push <remote> <current-branch>"
> 
> I update the branches I'm working in maybe 20 times a day, sometimes
> more. When I make a change and all the tests pass, I prefer to call
> 
>   git push
> 
> rather than
> 
>   git push origin 2.0-beta1
> 
> (and "2.0-beta1" is a short name here, some branches have much longer
> names)

You can use

  $ git push origin HEAD

and I think (but I am not sure) that there is DWIM-mery allowing
to simply say

  $ git push HEAD

and it would use configured branch.$(git symbolic-ref HEAD).remote


And if it is not as I said, the patches would better made it so, instead of
changing default behavior from push matching refspecs to push current
branch only.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux