Setting up Github and Submitting a Pull Request. - KSP-RO/RealPlume GitHub Wiki

Setting Up Github

I've always found this part to be the most unfriendly to new people getting involved in the various Realism projects, so here's a guide!

Installing a Git Client

SmartGit is one of the better programs out there, it's available on all platforms, and can do most everything you'll need to do to contribute to RealPlume.

Github for Windows/Mac is also an excellent tool, but it's still lacking in a few areas (For Example: When the master repository updates, you have to sync your own repository to it manually on the command line). That, and it's only available for Windows. This guide assumes you're using SmartGit.

Forking the RealPlume-StockConfigs repository

Go to the RealPlume-StockConfigs repository and click "Fork" in the upper right hand corner. This will create a copy of the repository on your account. As of right now, this fork only exists on the Github Server.

Cloning the RealPlume-StockConfigs repository

Next, we need a copy locally. On your RealPlume repository, there's a link in the lower left-hand corner entitled "https Clone URL", it should look something like this:

https://github.com/YourUserName/RealPlume-StockConfigs.git

Open SmartGit and if you're not prompted to clone a repository, select Repository -> Clone from the menu bar. Repository - Paste the repository Clone URL from above. Selection - Leave these settings alone Local Directory - Where to keep your files (Not your KSP installation, I keep mine in C:/Git/RealPlume-StockConfigs/, but you can keep yours anywhere.)

Select finish, and it downloads the repository.

Linking to KSP Install

For this, I use DirLinker on Windows, or create Symlinks in Mac & Linux

For DirLinker: Link Location - Your KSP install location. This folder will not actually exist, it's a "ghost copy" of the Github folder we created above. Link To - The place the ghost copy links to. This is the Github folder we created above (You want the C:/Git/RealPlume-StockConfigs/GameData/RealPlume-Stock folder in particular here).

Edit your files!

Now, go do the plume configuring, editing files, whatever you like!

Submitting a Pull Request

Once you've made some changes, and built some Plumes you're proud of, it's time to commit those changes and submit a Pull Request.

Commit your changes

If you go back to SmartGit, it should show you all the changes you've made in your local RealPlume-StockConfigs repository. If you're happy with all your changes, commit them by pressing "Commit" in the upper middle of SmartGit. Add a commit message explaining your changes and hit "Commit & Push". You may need to log in here with your Github credentials.

At this point, your changes are up to date on your account on the Github server.

Create a pull request

The last step is asking us to accept your changes. Go to your forked RealPlume-StockConfigs repository website (address looks something like: https://github.com/YourUserName/RealPlume-StockConfigs) and click on the green
Pull Request Icon on the left-hand side of the page. Review your changes again, add some comments so we know what you changed, and click "Create Pull Request".

That's it! We'll review it, and merge your changes!

Updating your Repository

So, after a while, a lot of stuff has changed, and you want to update your fork. Thankfully, with SmartGit, this is easy.

Add the upstream repository

In SmartGit, select Remote -> Add, then enter https://github.com/KSP-RO/RealPlume-StockConfigs.git as the URL, and upstream as the name.

Get the updates from the upstream repository

Select Pull, and make sure "Fetch from all remotes" is selected. From here you can select Pull or Fetch Only, either does what we need.

Merge the remote changes

Select Merge, and make sure that under "Branches" the upstream branch is selected. Once that's done, select the top-most item in the list labelled "Upstream", and select "Merge-Commit". ###Sync to the server At this point, all your synchronizing has been local, to make it "permanent" you'll need to sync to the server. Select Sync.

And that's the whole process, happy Githubbing!