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.gitor
git clone git://github.com/JuliaLang/julia.git myjuliaChange directory to the newly created clone
cd juliaand check the remote status
git remote -vAfter creating a fork of the julia repository under your own github account, add the repository
git remote add mine [email protected]:dmbates/julia.gitand check again
git remote -vCheck the available branches
git branchwhich should be just the master branch.
To make a new patch, create a new branch
git checkout -b linalg_testwhich will also switch to the new branch, as you can check with
git branchor
git statusNow 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 statusor
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 logor, better
git lgusing 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 HEADwhich 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 pullthen 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.