How to contribute on github?
Alex Rønne Petersen
xtzgzorex at gmail.com
Fri May 11 15:34:45 PDT 2012
On 12-05-2012 00:22, Mehrdad wrote:
> I haven't used git or github much. (Pretty much just once or twice, when
> someone added me.)
>
> How do I go about submitting potential changes to Phobos?
>
> (All I see on there is "GIT Read-only" which I feel is read-only, not
> something I can/know how to modify...)
OK, so what you do is you fork the Phobos repo. You then set up your
local clone like so:
$ mkdir phobos
$ cd phobos
$ git init .
$ git remote add upstream git at github.com:D-Programming-Language/phobos.git
$ git remote add origin git at github.com:YourUserNameHere/phobos.git
$ git fetch origin && git fetch upstream
$ git checkout -b master origin/master
Now you have a working directory and a local master branch set up to
track your fork's remote master branch.
Now you simply add commits to your repo, push them to GitHub (git push
origin master), and send a pull request to the upstream Phobos repository.
Synchronizing with upstream can basically be done like so:
$ git fetch upstream
$ git pull --rebase upstream master
$ git push origin master -f
This fetches the latest changes from upstream, unrolls your fork's
commits, adds in upstream's commits, then readds your fork's commits,
and finally, force-pushes your local branch to your remote branch (the
force push is necessary because you rewrite history, which is OK in your
personal fork).
--
- Alex
More information about the Digitalmars-d
mailing list