Hopefully someone can adapt this to a wiki post, but this should help those get started that might be confused, this will be more of a dump of how to do things :P
Cloning the repo (same as svn checkout)
Code:
$ git clone git://github.com/EQEmu/Server.git
If you don't want the folder to be called Server you can do if you would like it to be called EQEmuServer instead
Code:
$ git clone git://github.com/EQEmu/Server.git EQEmuServer
Update repo (svn update)
Or more fully (it defaults to the origin remote)
Switching to a branch (example TestBranch)
Code:
$ git checkout TestBranch
The rest of the examples assume you have a GitHub account set up with an SSH key generated (
https://help.github.com/articles/generating-ssh-keys), although I think you can use HTTPS URLs instead of GIT URLs if you don't want to use ssh keys.
Forking a repo
On
https://github.com/EQEmu/Server click the Fork button as seen in this image:
http://i.imgur.com/dOZ5sP4.png
Clone your repo
Code:
$ git clone git@github.com:username/Server.git
Keeping your fork in sync with upstream. After you clone your repo you will see your remote (where you can pull/push from) is only yours, you will need to add another remote that is the upstream repo.
Code:
$ git remote -v
origin git@github.com:username/Server.git (fetch)
origin git@github.com:username/Server.git (push)
Adding the repo
Code:
$ git remote add upstream git://github.com/EQEmu/Server.git
Code:
$ git remote -v
origin git@github.com:username/Server.git (fetch)
origin git@github.com:username/Server.git (push)
upstream git://github.com/EQEmu/Server.git (fetch)
upstream git://github.com/EQEmu/Server.git (push)
(Note: You shouldn't be able to push to the upstream repo)
Update from the upstream remote
Code:
$ git pull upstream
This will pull into a special branch or something, so next we need to merge it
Code:
$ git merge upstream/master
And push it to our fork
A nice thing about git is that we can now use Pull Requests instead of posting diffs in the Code Submission forum which means hopefully these things can get merged with the main repo much quicker, since copying the diffs can be a pain and most of the devs don't like to bother with them. It's probably best to create a branch in your fork for each pull request you make, then probably delete the branch after it was merged.
Submitting a pull request
On
https://github.com/EQEmu/Server click the pull request button shown here:
http://i.imgur.com/3jo905K.png
Then select the appropriate branch that has the changes you wish to be pulled into the main repo
http://i.imgur.com/QJPAON5.png
Hopefully this provides enough information for people to get going and contributing more! The GitHub help page is wonderful as well, so use that if you are having trouble.
Git for Windows works well enough on Windows, you can do most of these tasks from the GIT GUI in that (
http://msysgit.github.com/)
On Linux just follow your distros instructions for installing GIT
OSX: I have no idea!