Git interface for Unity

Hey all,

I’m not sure how many people are interested in this, but I’ve started working on an interface between Unity and Git.

So far you can:

  1. Create a repo if one doesn’t exist
  2. Commit files
  3. Create, Delete, and Checkout branches.
  4. Push/Pull to/from a local repo or network drive (doesn’t work with web yet)
  5. Do a “commit all” if you’re lazy like me and just want to do a quick commit of everything you’ve updated.
  6. View conflicts with a very basic diff viewer.
  7. Resolve conflicts.

Current repo for it is on github, feel free to contribute! :slight_smile:

https://github.com/NateWardawg/UnityGit

Thanks,
Nathan

617213–23386–$UnityGit.unitypackage (12.7 KB)

Oh great. Am using git a few days back. Started using it but i am too new to git and so followed some tutorial and gotten git extension to work with drop box on my windows 7. This looks good. I can use it. Thanks.

Anyways mind if you explain how git works because now when i commit stuff, not all the stuff are uploaded like svn but only the diff files because i am using dropbox as my git server or whatever you call. So is this supposed to be how it works? Thanks anyways.

Hi zine,

Yeah, basically if you have your dropbox setup as your bare repository, you won’t see any actual files, just the “pushed” objects/diffs/deltas or whatever you want to call them. My build doesn’t have any revision history in it yet, but, you can download something like TortoiseGit to view the actual revisions and their diffs.

I use dropbox too for my projects to get them between home and work, it’s much faster than uploading to a server and manually downloading again isn’t it, haha.

Thanks for the feedback,
Nathan

No problem. So that means i can use this plugin with a dropbox setup? Sorry just too new to git and source control. :smile: But thanks for helping me.

Yep, sure can since dropbox is actually a local folder that gets synced to a server. :slight_smile: Also, just an FYI if you don’t already know, you can actually have a bare repository for git anywhere, it doesn’t have to be on a server, it can just be a folder on your local machine, which is actually how I learned how to use it.

Repo refers to where the softwares commits get pushed and pulled to, am i right?

Hi zine, yep, that’s right. Feel free to ask all the questions you want to. I was new to this stuff a little less than 6 months ago and was pretty intimidated by it, but once you get it, it comes pretty naturally :slight_smile:

Just FYI, I’ve uploaded a new package of a few new things that have been included in this code library.

This build includes:

  1. Garbage Collection (both “git gc” and “git gc --auto” commands.
  2. Some basic Git config settings… pack size limits and turning CRLF on and off locally and globally.
  3. Auto creates .gitignore files for your Unity project if you need them. It creates one for library and one for the root folder to ignore the csproj and like files.
  4. Other code fixes and optimizations have been done, but quite frankly, I don’t remember what many of them were.

Sorry, still only works on Windows, but I’d love to get it working on a Mac as well. :slight_smile:

Is this still usable for Unity4.2 ? I keep getting IndexOutOfRange Exception, and the commit window is 1 x 1 pixels and can’t be resized :frowning:

+1