(The following instructions are shamelessly taken from gsweeny's epiar-devel post)
1) Getting started on github
- Go to github.com, create an account, log in
- Go to knowknowledge's Epiar repository page http://github.com/knowknowledge/Epiar and click 'Fork' - this will take an image of knowknowledge's repository for you to use for yourself. This is the repository you will always push your changes to.
- Go to your new repository, click Admin -> Service Hooks -> Email
- Put "epiar-commits@…" in the address field, make it Active and Update Settings -- this will send an update for any pushes you make to your repository to the epiar commits mailing list.
- You need to set up your ssh keys to be able to push stuff from your local repository to your github repository - follow the instructions here: http://help.github.com/msysgit-key-setup/
2) Getting the Epiar repository locally
What I did was pull knowknowledge's master branch locally, made changes to it, and then pushed the changes back up to my own repository. For example:
Clone the repository to local:
git clone git://github.com/knowknowledge/Epiar.git
Add your own repository as a remote repository named 'upstream' (or whatever you want really). You can find the path in the SSH field on the Epiar page from your github account.
git remote add upstream git@github.com:yourusername/Epiar.git
Make changes to the local stuff and commit them locally.
<changes> <testing> git commit --interactive
(As a general guideline, if you make different kinds of changes, you should make different commits for each kind of change. This makes it easier to associate the commit comments with the changes. For example, if you fix a bug in Sprite::Draw, and add a new feature in Projectile.cpp, you should make two commits with different explanations for the changes. This isn't a rule though, changes that don't follow this model will still be accepted.)
Push your changes to your remote repository (named 'upstream' in this example)
git push upstream
Getting local copies of remote changes.
The git command 'fetch' will find any changes on the remote repository that you don't already have locally. The git command 'merge' will merge your current branch with a target branch (for example, the 'master' branch from the 'origin' remote repository).
git fetch origin git merge origin/master
You can also do the fetch and merge in one step by using the command 'pull'.
git pull origin master
If you are using Microsoft Windows, you can also donwload an interface version of git called TortoiseGit?. It is a port of the well known TortoiseSVN for git. TortoiseGit? supports almost(!) all features of git in a easy to use UI.
The main page is http://code.google.com/p/tortoisegit/ where you can get more information. Please note you need to install msysgit ( http://code.google.com/p/msysgit/ ) as well. TortoiseGit? is only the interface.
3) Git reference
I found this guide to be a good start for using git: http://gitref.org/index.html