Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Use Git to manage Kerbal Space Program saves, ships and CKAN mods

This example show how to manage two KSP installs, like one on your Windows gaming rig and one on your Mac, as they were one.

First, create a GitHub repo called git-ksp-ckan under your own username

Then, if your Mac is the starting point:

cd ~/Library/Application Support/Steam/SteamApps/common/Kerbal Space Program
git init
cp CKAN/installed-default.ckan CKAN/should-be-installed.ckan
git add CKAN/should-be-installed.ckan
echo "saves/scenarios" >> .gitignore
echo "saves/training" >> .gitignore
git add .gitignore
git add saves

Create a commit with the date and time as message

git commit -a -m $(date "+%Y%m%d%H%M")
git remote add origin<yourusername>/git-ksp-ckan.git

Push the changes up to GitHub

git push -u origin master

Now on your Windows PC start "Git Bash"

First we make sure ckan.exe is in the KSP folder

cd "/c/Program Files (x86)/Steam/SteamApps/Common/Kerbal Space Program"
cp /c/Users/<yourusername>/Downloads/ckan.exe .
ckan.exe update

Then we add our Git repository and fetch the files

git init
git remote add origin<yourusername>/git-ksp-ckan.git
git fetch --all
git reset --hard origin/master

Now it's time to make sure CKAN is correctly up to date

ckan.exe install -c CKAN/should-be-installed.ckan

You should now be able to start KSP, see your old saves and ships, and have all the right mods installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.