git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: Sitaram Chamarty <sitaramc@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: easy way to make tracking branches?
Date: Sun, 18 Jan 2009 16:53:38 +0100	[thread overview]
Message-ID: <20090118155338.GK11992@leksak.fem-net> (raw)
In-Reply-To: <slrngn6j4t.9he.sitaramc@sitaramc.homelinux.net>

Hi,

Sitaram Chamarty wrote:
> > Now I want to make "foo" a tracking branch for "bar".
> > I do:
> >
> > 	git config branch.foo.remote srv
> > 	git config branch.foo.merge refs/heads/bar
> 
> I just do a "git pull srv" when the tracking is *not* setup,
> and git reminds me what commands to use.

Oh, this is great! (Just tested.)

Usually (in my use case) there is no need to pull before I set up
a tracking branch, so I never tried this.

And git only reminds you if you have no tracking branch set for
srv yet. But that's no problem, because if one is set I can
copy&paste the lines in .git/config.

Altogether, this is a solution I can live with.

> > And to get a comfortable git-push, I do:
> >
> > 	git config --add remote.srv.push foo:bar
> 
> This one you'll just have to remember, I guess :-)

This is not too hard. :-)

> > 	git checkout -b foo2 srv/bar
> > 	git branch -d foo
> > 	git branch -m foo
> >
> > which is suboptimal because deleting foo can remove some
> > other settings for the branch, e.g. mergeoptions.
> 
> it also doesn't seem to set remote.srv.push, as far as I can
> tell.

Right.


Thanks,
  Stephan

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

      reply	other threads:[~2009-01-18 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-18 10:55 easy way to make tracking branches? Stephan Beyer
2009-01-18 15:37 ` Sitaram Chamarty
2009-01-18 15:53   ` Stephan Beyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090118155338.GK11992@leksak.fem-net \
    --to=s-beyer@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=sitaramc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).