Mark Ferrell <> 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
         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.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to