Using Git 2
From Naevwiki
This article describes the steps needed to set up a Github repository in order to push commits. It is assumed you already have Git set up.
- If you don't already have one, create an account at Github.
- When your account is ready, navigate to bobbens' Naev repo. This repo is the official naev repo that everything else is relative to. Find the "Fork" button near the top right of the page. Use this button to fork the repo to your own account.
- Add a public SSH key to your Github account. The steps for doing this are detailed here.
- If you already have a repo clone on your hard drive, it's a good idea to change your "origin" remote from bobbens' repo to your own. The command for this is:
git remote set-url origin git@github.com:$USER/naev.git
Where $USER is your Github account name. This URL should be visible on Github as well, when viewing your fork of the Naev repository. If everything went well, you should now be able to push commits to your own repo. You should also add bobbens' repo as a remote, so that you can pull from there when changes are made. To do this, type:
git remote add bobbens git://github.com/bobbens/naev.git
After this you can pull with
git pull bobbens <branch>
Where <branch> is the name of the branch you want. This will usually be master.
Below you'll find a few useful commands for adding and changing tracked files.
To add new files to be tracked by git, type
git add <path>
To commit a file or path, type
git commit <path>
To commit all changed files (including files you manually added), type
git commit -a
To push your commits, type
git push origin