Please read the Development Guide. If you are interested in the infrastructure and production setup of SpaceDock, see Infrastructure.
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/<YourUsername>/SpaceDock.git
- Configure
git pull
to do fast-forward merges only:git config --global pull.ff=only
- Add the main repo as a remote:
git remote add upstream https://github.com/KSP-SpaceDock/SpaceDock.git
- Get the alpha branch from the main repo:
git checkout -b alpha upstream/alpha
- First check out
alpha
:git checkout alpha
- Make sure it is up-to-date:
git pull upstream alpha
- Create a new branch:
git checkout -b fix/<one-to-three-word-summary>
We tend to prefix our branch names withfix/
for bugfixes andfeature/
for new features - Do your changes here with your favourite text editor or IDE.
- Add your changes to the index:
git add <path/to/changed/file> <path/to/another/file>
Make sure you only add changes that you actually want to commit!git commit -A
might include files you didn't want to. You can review your currently added changes with:git diff --staged
- Create a commit with the staged changes:
git commit -m "A small message about your commit
- Push the changes to your GitHub fork:
git push --set-upstream origin fix/<one-to-three-word-summary>
- Prepare a pull request on GitHub. If you open your fork on github.com it probably already shows you a button to do this. Enter a detailed summary into the PR body text box. Include your motivation for the feature, a way to reproduce the bug if possible, and other points that might be important or helpful for reviewers. Go through your diff one more time to make sure everything is included, do a "self-review".
There are more extensive guides available at https://guides.github.com/, e.g.