Re: git: using branches



On Sat, Apr 18, 2009 at 7:40 AM, Gil Forcada <gforcada gnome org> wrote:
> Which version is the new one? 1.6.2.x? Because I have a 1.6.0.x and it
> doesn't allow me to skip the -b and the local branch name.

I tried with 1.6.2.x.

The -b issue with --track has been resolved in Git 1.6.1,
http://lkml.org/lkml/2008/12/25/8

«* "git checkout --track origin/hack" used to be a syntax error.  It now
  DWIMs to create a corresponding local branch "hack", i.e. acts as if you
  said "git checkout --track -b hack origin/hack".»

Simos

> Cheers,
>
> El ds 18 de 04 de 2009 a les 00:07 +0100, en/na Simos Xenitellis va
> escriure:
>> On Fri, Apr 17, 2009 at 10:41 PM, Jason D. Clinton <me jasonclinton com> wrote:
>> > On Fri, Apr 17, 2009 at 4:29 PM, Simos Xenitellis
>> > <simos lists googlemail com> wrote:
>> >> Is the '--track' parameter required when using 'git checkout'?
>> >
>> > My git-config manpage says its on by default and it has been that way
>> > for as long as I've been using git.
>> >
>>
>> The issue about --track and -b _branchname_ is a bug in Git,
>> http://kerneltrap.org/mailarchive/git/2008/10/19/3723354
>>
>> So, with old/all git versions,
>>
>> $ git checkout -b composer-dev origin/composer-dev
>> Branch composer-dev set up to track remote branch
>> refs/remotes/origin/composer-dev.
>> Switched to a new branch 'composer-dev'
>> $ _
>>
>> With old git versions, if you try to omit -b <branch>, you get
>> $ git checkout --track origin/compose-dev
>> fatal: git checkout: --track and --no-track require -b
>> $ _
>>
>> With newer git version,
>>
>> $ git checkout --track origin/composer-dev
>> Branch composer-dev set up to track remote branch
>> refs/remotes/origin/composer-dev.
>> Switched to a new branch 'composer-dev'
>> $ _
>>
>> So, if you have the latest version of git, you do not need to specify
>> the local branch in the command line.
>> I think the new system looks cleaner and less error-prone.
>> For now, we keep the old syntax at live.gnome.org.
>>
>> Simos
>> _______________________________________________
>> gnome-i18n mailing list
>> gnome-i18n gnome org
>> http://mail.gnome.org/mailman/listinfo/gnome-i18n
> --
> gil forcada
>
> [ca] guifi.net - una xarxa lliure que no para de créixer
> [en] guifi.net - a non-stopping free network
> bloc: http://gil.badall.net
>
>


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