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
or
git clone git://github.com/JuliaLang/julia.git myjulia
Change directory to the newly created clone
cd julia
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 [email protected]:dmbates/julia.git
and check again
git remote -v
Check the available branches
git branch
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
git branch
or
git status
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.
git status
or
git diff
(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
git log
or, better
git lg
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 protected]:dmbates/julia.git
* [new branch] HEAD -> linalg_test
Checking on 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
This is a great summary--I'll link back to this in the video description.