Search Unity

[OpenSource] UniGit - In-Editor Git GUI

Discussion in 'Assets and Asset Store' started by Simeon, Nov 11, 2016.

  1. Simeon

    Simeon

    Joined:
    Sep 26, 2012
    Posts:
    50

    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





     
    Last edited: Nov 11, 2016
    laurentlavigne and starikcetin like this.
  2. KingfisherWyvernStudio

    KingfisherWyvernStudio

    Joined:
    Oct 5, 2011
    Posts:
    324
    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:
    Code (CSharp):
    1. Missing default gitignore.txt in resources
    2. UnityEngine.Debug:LogError(Object)
    3. UniGit.GitHistoryWindow:InvalidRepoGUI() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitHistoryWindow.cs:611)
    4. UniGit.GitSettingsWindow:OnGUI() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitSettingsWindow.cs:81)
    5. UnityEditor.DockArea:OnGUI()
    And:
    Code (CSharp):
    1. Unable to find required resource at 'Editor Default Resources/UniGit/Git-Settings.asset'
    2. UnityEditor.EditorGUIUtility:LoadRequired(String)
    3. UniGit.GitManager:Initlize() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitManager.cs:69)
    4. UniGit.GitHistoryWindow:InvalidRepoGUI() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitHistoryWindow.cs:615)
    5. UniGit.GitSettingsWindow:OnGUI() (at D:/My Documents/My Pictures/My Art/Games/UniGit/Assets/Plugins/UniGit/Editor/GitSettingsWindow.cs:81)
    6. UnityEditor.DockArea:OnGUI()
    7.  

    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?
     
    Last edited: Nov 15, 2016
  3. Simeon

    Simeon

    Joined:
    Sep 26, 2012
    Posts:
    50
    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.
     
  4. Rockwall33

    Rockwall33

    Joined:
    Mar 4, 2016
    Posts:
    186
    Does this work with Unity 2017?

    Thanks,
    XaloX
     
  5. Simeon

    Simeon

    Joined:
    Sep 26, 2012
    Posts:
    50
    Yes
     
  6. Rockwall33

    Rockwall33

    Joined:
    Mar 4, 2016
    Posts:
    186
    Awesome thank you!! :D

    Cheers!
    XaloX
     
  7. JeromeJ

    JeromeJ

    Joined:
    Nov 26, 2017
    Posts:
    5
    Is it solely for GitHub or can it be used with Gitlab and others? (It should as it relies on git, wouldn't it?)
     
  8. Simeon

    Simeon

    Joined:
    Sep 26, 2012
    Posts:
    50
    It just relies on git. Any remote hosting should work as long as it supports Http/s
     
  9. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    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.
     
  10. JeromeJ

    JeromeJ

    Joined:
    Nov 26, 2017
    Posts:
    5
    @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.
     
    starikcetin likes this.
  11. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    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.
     
  12. Simeon

    Simeon

    Joined:
    Sep 26, 2012
    Posts:
    50
    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.
     
    starikcetin likes this.
  13. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    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/..."
     
    starikcetin likes this.
  14. Simeon

    Simeon

    Joined:
    Sep 26, 2012
    Posts:
    50
    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.
     
  15. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    Yeah, it is going to make plugin development so much better.
     
  16. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    this is cool
    but... how do i enter the repo information in it?
     
  17. junshwa

    junshwa

    Joined:
    May 29, 2020
    Posts:
    7
    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?