[phobos] pushing a pull request

Jonathan M Davis jmdavisProg at gmx.com
Tue Apr 5 23:29:29 PDT 2011


> Hello,
> 
> 
> I have my own branch of phobos and would like to merge it with the
> phobos trunk proper.
> 
> How do I do this? Do I need a separate tree for phobos apart from my own
> branch of it, or can I just get away with one tree?
> 
> 
> Thanks,
> 
> Andrei
> 
> P.S. Here is my .git/config:
> 
> [core]
>          repositoryformatversion = 0
>          filemode = true
>          bare = false
>          logallrefupdates = true
>          ignorecase = true
> [remote "origin"]
>          fetch = +refs/heads/*:refs/remotes/origin/*
>          url = git at github.com:andralex/phobos.git
> [branch "master"]
>          remote = origin
>          merge = refs/heads/master
> [branch "work"]
>          remote = origin
>          merge = refs/heads/work
> [remote "mothership"]
>          url = git at github.com:D-Programming-Language/phobos.git
>          fetch = +refs/heads/*:refs/remotes/mothership/*

From the looks of it, mothership is the main repository (github suggests 
upstream as the name - but that's not all that important). So, if you run

git-pull mothership master

it will fetch and merge in the latest trunk/master from the main repository 
into your current branch. If you run

git-push mothership master

it will push the changes into the main repository's master branch from your 
current branch. I'm not quite sure what happens if there's a merge conflict in 
this case though. Presumably, have to resolve it before it'll let you push, 
but I'm not sure how that differs from dealing with conflicts when pulling.

Personally, I always keep my master branch in line with the main repository's 
master branch. That way, it's easy to build the current version of Phobos 
which is in the main repository, and when I push it to the main repository, I 
don't have to worry about merge conflicts. Also, all of the merge conflicts 
that I have to deal with are local to my box, since I'm only ever merging 
branches on my own box, pulling to a clean branch, or pushing a branch which 
has already been merged.

- Jonathan M Davis


More information about the phobos mailing list