[OpenSource] UniGit - In-Editor Git GUI

I was tired of going and managing my VCS from outside so I decided to integrate it into unity. Also had some people on my team who are not that friendly with Git.

It uses the LibGit2Sharp library and Windows Credentials Manager for password management on windows. UniGit provides most git features internally without any external support (except GIT).
It also integrates with external tools to provide more reliable GIT commands, such as Git Extensions and Git Tortoise.

I hope you contribute or just find it useful.

Source | Releases | Issues

Screenshots

2 Likes

Hey,

For which Unity version have you made this?
Also, I’ve imported the package you listed on GitHub and I got the following errors upon opening the Git Settings window ->create:

Missing default gitignore.txt in resources
UnityEngine.Debug:LogError(Object)
UniGit.GitHistoryWindow:InvalidRepoGUI() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitHistoryWindow.cs:611)
UniGit.GitSettingsWindow:OnGUI() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitSettingsWindow.cs:81)
UnityEditor.DockArea:OnGUI()

And:

Unable to find required resource at 'Editor Default Resources/UniGit/Git-Settings.asset'
UnityEditor.EditorGUIUtility:LoadRequired(String)
UniGit.GitManager:Initlize() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitManager.cs:69)
UniGit.GitHistoryWindow:InvalidRepoGUI() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitHistoryWindow.cs:615)
UniGit.GitSettingsWindow:OnGUI() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitSettingsWindow.cs:81)
UnityEditor.DockArea:OnGUI()

Also, clicking the “External” tab crashes my unity. Upon opening a new empty project I get error messages about windows not having closed properly after Unity crashed because of the external tab. In the end I can clean everything and get a working Unity again, but this is rather unexpected.

Did I also have to download Source code file? When importing a package, I’d expected it to be complete and not having to download additional files to get it to work, to be honest.

Additionally… It apparently uses things that are supposed to be in “My Documents”. Well, that is not on the drive listed above, since My Documents is on my SDD instead. I have my projects on a separate harddrive instead of my main SDD.

Maybe this is the reason Unity crashed?

It’s made with unity 5.4.1f1. The package should have everything needed. The crashes and errors you experienced are just bugs. It’s started as an internal project so I haven’t done much testing. That’s why there is the Issues page on Github. I’ve fixed the problems you experienced they should be up in version 1.0.2.

1 Like

Does this work with Unity 2017?

Thanks,
XaloX

Yes

Awesome thank you!! :smile:

Cheers!
XaloX

Is it solely for GitHub or can it be used with Gitlab and others? (It should as it relies on git, wouldn’t it?)

It just relies on git. Any remote hosting should work as long as it supports Http/s

I use sourcetree and git bash externally. I intend to use this only to see which files/folders are currently changed in the project window. Will this introduce any friction in my workflow?

Very kind of you to make it open source btw.

@starikcetin Personally worked fine for me. Just had to gitignore the files from UniGit.

Gitignored the following:
/Assets/Plugins/UniGit/Editor
/Assets/Plugins/WindowsCredentialManagement/Editor

I only did this setup once and it was long ago so you may have to try it out to be sure. Everything still work fine for me. It’s handy to see what has been modified in real time.

When pushing/pulling/comitting outside of UniGit etc, sometimes I noticed it doesn’t refresh on its own but you can ask it to do it via the context menu.

1 Like

I set up my GitHub repos so that the Unity project is contained within a folder. UniGit doesn’t seem to recognize this.

Maybe implementing a prompt window with “Select the root folder of the repository” might work out in this case.

I should add that as a todo

Yes you can and it shouldn’t cause any issues. You can even enable file watching for files that are outside the assets folder so that they can refresh if you change them from the outside.

1 Like

Same here.
Are you still planning to implement this?

What I also would suggest: Do not use multiple folders for the asset. It makes it hard to manage when you want to remove it. Instead, use a folder (which is not a standard unity folder) and put everything inside, like “UniGit/Plugins/…”

1 Like

Unfortunately, I don’t have the free time. So it’s unlikely to be added soon. Maybe once Unity officially supports packages from custom git repositories.

Yeah, it is going to make plugin development so much better.

this is cool
but… how do i enter the repo information in it?

Hello.
I have successfully imported UniGit.
However I can’t find a menu to open UniGit.
Where is the menu to open UniGit?
Why don’t you mention the method in the README.md?

According to the https://github.com/simeonradivoev/UniGit/blob/master/Editor/GitUnityMenu.cs file it’s Window/Git/*