kria

[1.1.x] KerbalGit - Versioning of saves directory using Git

Recommended Posts

I got tired of messing up missions and not being able to revert to a good point, so I made a simple plugin to version control the saves directory using Git. Jebretary is probably a better choice for most people, but if you know your way around Git and just want a simple plugin that does commits, then maybe KerbalGit can be of use.

https://github.com/kria/KerbalGit

The plugin is very basic and doesn't have a UI. Don't install KerbalGit unless you are comfortable using Git!

When first run, the plugin will set up a Git repository for the saves/ directory. The .git/ directory itself is placed in GameData/KerbalGit/. The plugin is invoked and commits changes on three events:

  • autosave
  • quicksave (F5)
  • save in VAB/SPH

kerbalgit-commits.png

OS support

I have only tried KerbalGit on Windows. The plugin uses LibGit2Sharp 0.17 which relies on the the native library libgit2. A Windows binary (git2-06d772d.dll) is included, but separate builds are needed for Linux and OSX.

Installation

  1. Get the latest release.
  2. Copy GameData/KerbalGit/ to your KSP directory.
  3. Copy git2-06d772d.dll (on Windows) to the root of your KSP directory. Pick the correct one from NativeBinaries/ depending on if you run KSP in 32-bit or 64-bit mode.

Configuration

You can exclude any files and directories that you don't want to have under version control in saves/.gitignore. In GameData/KerbalGit/settings.cfg, you can set the minimum interval (in seconds) between commits and the committer's name and email.

Edited by kria

Share this post


Link to post
Share on other sites

KerbalGit 0.3.0 released with support for KSP 1.1 and Unity 5. Make sure to pick the correct libgit2 binary, depending on if you run KSP in 32-bit or 64-bit mode.

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.