Re: git: using branches
- From: Simos Xenitellis <simos lists googlemail com>
- To: "Jason D. Clinton" <me jasonclinton com>
- Cc: gnome-i18n <gnome-i18n gnome org>, zuh iki fi
- Subject: Re: git: using branches
- Date: Sat, 18 Apr 2009 00:07:27 +0100
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]