git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Renaming remote branch
@ 2011-04-15 23:12 Maaartin
  2011-04-20 18:41 ` Maaartin
  0 siblings, 1 reply; 2+ messages in thread
From: Maaartin @ 2011-04-15 23:12 UTC (permalink / raw
  To: git

I'm tracking a couple of other people's projects using git. Some of them
are git repositories, some are svn. For the svn repos I get sometimes a
remote branch called "trunk", sometimes I get "git-svn". For the git
repos I get always the "master" branch and sometimes some more.

I am only interested in the master branch (i.e., master, trunk, or
git-svn, whatever applies). I'd like to make it all work the same, and
ideally name the remote branch "org", so I can do

git checkout master; git fetch-upstream; git rebase org

where "fetch-upstream" is my repository-local alias getting the data
from the upstream (e.g., "git svn fetch"). The fetch works fine, but I'm
failing to rename the remote branch for one repository (I may be using a
wrong term here; what I want is to make the above command line work for
all my repos).

Regards, Maaartin.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Renaming remote branch
  2011-04-15 23:12 Renaming remote branch Maaartin
@ 2011-04-20 18:41 ` Maaartin
  0 siblings, 0 replies; 2+ messages in thread
From: Maaartin @ 2011-04-20 18:41 UTC (permalink / raw
  To: git

On 11-04-16 01:12, Maaartin wrote:
> I'm tracking a couple of other people's projects using git. Some of them
> are git repositories, some are svn. For the svn repos I get sometimes a
> remote branch called "trunk", sometimes I get "git-svn". For the git
> repos I get always the "master" branch and sometimes some more.
> 
> I am only interested in the master branch (i.e., master, trunk, or
> git-svn, whatever applies). I'd like to make it all work the same, and
> ideally name the remote branch "org", so I can do
> 
> git checkout master; git fetch-upstream; git rebase org
> 
> where "fetch-upstream" is my repository-local alias getting the data
> from the upstream (e.g., "git svn fetch"). The fetch works fine, but I'm
> failing to rename the remote branch for one repository (I may be using a
> wrong term here; what I want is to make the above command line work for
> all my repos).

I think, I've found a simple solution. For remote git repos I use

[remote "upstream"]
	url = ...
	fetch = +refs/heads/*:refs/remotes/upstream/*
	fetch = +refs/heads/master:refs/remotes/org

thus mapping the remote master also to "refs/remotes/org". For svn repos
I use

[svn-remote "svn"]
	url = ...
	fetch = :refs/remotes/org

In both cases I get a remote branch "org" (no "git-svn", no
"upstream/org") and that's all I really need for "git rebase org" to do
what I want.

Regards, Maaartin.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-20 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15 23:12 Renaming remote branch Maaartin
2011-04-20 18:41 ` Maaartin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).