The easiest way to let us know about your awesome work is to send a pull request on github or in IRC.
Use summary (bug #bugzilla bug ID#) for the commit message. Eg:
Improve contributing instructions (bug 1041234)
Point us to a branch with your new code and we'll go from there. You can attach a patch to a bug if you're more comfortable that way.
Please read the :ref:`style`.
We're going to talk about two git repositories:
- origin will be the main olympia repo at http://github.com/mozilla/olympia.
- mine will be your fork at http://github.com/:user/olympia.
There should be something like this in your .git/config
already:
[remote "origin"] url = git://github.com/mozilla/olympia.git fetch = +refs/heads/*:refs/remotes/origin/*
Now we'll set up your master to pull directly from the upstream olympia:
[branch "master"] remote = origin merge = master rebase = true
This can also be done through the git config
command (e.g.
git config branch.master.remote origin
) but editing .git/config
is
often easier.
After you've forked the repository on github, tell git about your new repo:
git remote add -f mine git@github.com:user/olympia.git
Make sure to replace user with your name.
Let's work on a bug in a branch called my-bug:
git checkout -b my-bug master
Now we're switched to a new branch that was copied from master. We like to work on feature branches, but the master is still moving along. How do we keep up?
git fetch origin && git rebase origin/master
If you want to keep the master branch up to date, do it this way:
git checkout master && git pull && git checkout @{-1} && git rebase master
That updated master and then switched back to update our branch.
The syntax is git push <repository> <branch>
. Here's how to push the
my-bug
branch to your clone:
git push mine my-bug