From: Junio C Hamano <gitster@pobox.com>
To: Mark Ferrell <major@homeonderanged.org>
Cc: git@vger.kernel.org
Subject: Re: Triangular workflow with Central repo
Date: Wed, 25 Jun 2014 10:32:31 -0700 [thread overview]
Message-ID: <xmqqionoao9c.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CANR0-ag4ZKmHBNPxYkohBJEpXierFV+K3Ub4tH8YYD7FK73FdA@mail.gmail.com> (Mark Ferrell's message of "Mon, 23 Jun 2014 16:37:22 -0700")
Mark Ferrell <major@homeonderanged.org> writes:
> push repository, but our use case relies on the pull branch being
> different than the push branch. It would seem that git would need a
> branch.<name>.push directive for this to work out.
I thought that you can tell recent versions of Git to pay attention
to the remote.*.push patterns and use them as a refmap even when you
are pushing a single branch?
Here is a demonstration:
$ (git init src && cd src && git commit --allow-empty -m foo)
$ git clone src dst
$ cd dst
$ edit .git/config ; cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = ../src
fetch = +refs/heads/*:refs/remotes/origin/*
push = refs/heads/*:refs/heads/dev/me/*
# note that I edited out [branch "master"] section to show that
# you do not even need per-branch configuration.
$ git commit --allow-empty -m bar
$ git push
Counting objects: 1, done.
Writing objects: 100% (1/1), 184 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To ../src
* [new branch] master -> dev/me/master
For simplicity I used two local repositories and used a random
pattern "refs/heads/dev/me/*", trusting that the readers are capable
of updating the example to use remote URLs and different hierarchies
as needed.
prev parent reply other threads:[~2014-06-25 17:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 23:37 Triangular workflow with Central repo Mark Ferrell
2014-06-25 17:32 ` Junio C Hamano [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=xmqqionoao9c.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=major@homeonderanged.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.