These notes are based on Patrick O'Leary's video that he kindly created when I was wingeing about problems with git. It is best to watch the video first then go back through these notes to recall the steps.
Create a clone of the JuliaLang repository
git clone git://github.com/JuliaLang/julia.git
git clone git://github.com/JuliaLang/julia.git myjulia
Change directory to the newly created clone
and check the remote status
git remote -v
After creating a fork of the julia repository under your own github account, add the repository
git remote add mine firstname.lastname@example.org:dmbates/julia.git
and check again
git remote -v
Check the available branches
which should be just the master branch.
To make a new patch, create a new branch
git checkout -b linalg_test
which will also switch to the new branch, as you can check with
Now edit or add the file(s) you wish to change (in my case
test/lapack.jl) then check that indeed the file has been edited.
(This can also be accomplished within emacs by running
M-x git-status in this directory.)
At this stage I prefer to operate in the
*git-status* buffer to add and commit the change to the local clone. The shell version is
git add test/lapack.jl git commit
You can check the log at this point
using the alias available at (http://www.jukie.net/bart/blog/pimping-out-git-log).
To create a pull request the change must first be pushed to the user's github repository.
git push mine HEAD
which should respond with something like
To email@example.com:dmbates/julia.git * [new branch] HEAD -> linalg_test
github.com should show the newly created branch with the change. Select the branch and click the
Changes button to verify this.
Before creating a pull request, ensure that your branch is up to date
git checkout master git lg git pull
then switch back to the modified branch, rebase it, check the log and push to mine if required.
git checkout linalg_test git rebase master git lg git push mine HEAD