[dmd-internals] Fixing github pull requests that I borked up

Leandro Lucarella luca at llucax.com.ar
Wed Oct 9 03:33:24 PDT 2013


Jacob Carlborg, el  8 de October a las 11:50 me escribiste:
> On Oct 08, 2013, at 10:25 AM, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> 
> >That's perfectly fine as long as it's to your branch (which it normally would
> >be for a PR). The problem is when it's done to master. However, I didn't know
> >that you could get away with doing a push without listing the target branch. I
> >always list the target branch, which is less error-prone, since you're never
> >going to push -f to master.
> 
> It depends on your git settings. You can tell git to either push all your branches (that have a matching branch on the remote) when doing "git push" or just push the active branch. There are couple more alternatives as well.
> 
> See the first four examples here:
> 
> https://www.kernel.org/pub/software/scm/git/docs/git-push.html#_examples
> 
> Have a look at this as well:
> 
> https://www.kernel.org/pub/software/scm/git/docs/git-config.html
> 
> Search for "push.default". The default value of this setting was/will be changed in Git 2.0.

In latests versions of Git (1.8 I think) there is more support for the
"triangular-worflow" as used in GitHub (usually pulling from one place
but pushing to another).

Just do:
git config --global remote.pushdefault <your-fork-remote>
git config --global push.default current (not all the modes works with
					  the pushdefault option yet, so
					  this one is pretty safe, only
					  push the current branch)
Then use as the default remote in each repo the "blessed" repo:
git config branch.<name>.remote <official D repo remote>

With this configuration, when you do `git pull` it will fetch from the
official repo and when you do `git push` it will push to your fork. If
you need to push to the official repo, just use the remote name
explicitly (git push <official D repo remote> <branch>).

Hope it helps.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
ADOLESCENTE MUERE DESNUCADO POR TRATAR DE AUTOCHUPARSE
	-- Cronista TV


More information about the dmd-internals mailing list