Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Super Simple git tool with git-lfs support: Git-It-GUI (good for games)

Discussion in 'General Discussion' started by zezba9000, Feb 11, 2017.

  1. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    Made a Git GUI client designed to solve a real world problem of using Git with games and collaborating with artists / level designers. I am now using it along with others at work.

    The tool supports Git-LFS, P4Merge, etc and is very easy to use.
    Link: https://github.com/reignstudios/Git-It-GUI/releases

    EDIT: Major update and huge improvements to just about everything in v0.9.0+





     
    Last edited: Nov 6, 2017
  2. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    I haven't tied it.. did you really need to build it for .net 4.6.2?

    _edit should be a put screenshot of what it looks like.. can tell a lot by the gui design of a tool.
     
    Martin_H likes this.
  3. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    No its doesn't need to be .NET 4.6.2 but that .net version auto installs on every computer including Windows Vista. That .NET version also has path length and async fixes... so I thought it was a good idea.

    I can't downgrade the .NET version if people want to build it and are having issues. Just let me know.

    Also there is a screen shot in the repo home: https://github.com/reignstudios/Git-It-GUI
    I'll post one here too.
     
    Last edited: Feb 11, 2017
    Player7 likes this.
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    So what's this got that something like SourceTree doesn't? Is there any reason I should consider a switch?
     
  5. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    Because this tool is way easier to use simply put. I made it specifically for people who find SourceTree or TortisieGit to complex.

    Most tools that support Git-LFS have way to many advanced options littered everywhere in the UI, keep around merge conflict temp files and don't ask the user before staging a conflicted file. For artists / level designers this is something you don't want happening or they end up committing tons of temp files. The tool also can auto set up Git-LFS with most of the files you would need tracked for Unity.

    It also has a "Simple" and "Advanced" mode for syncing changes with the server. Simple mode just gives the user a "Sync" button as it makes sense to many users in the familiar context of wanting to sync with an external server/device. Advanced gives you the normal "Pull" / "Push" buttons... which even then is pretty simple.

    Another plus is I made the last repo opened list to function like Unity's start screen.
     
    Last edited: Feb 11, 2017
  6. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    In either case the project it totally open source. It's another option and I have gotten very good feedback thus far from people I work with. I would try it if you're using Git-LFS (or not) and working with others having issues with other git tools.
     
  7. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I'm a bit sad that you missed the opportunity to call your tool "git gud!".


    In my very limited experience with it, sourcetree was a pile of garbage. It had a bug that caused it to be ridiculously slow or even crash. It was the most unresponsive GUI I've ever used. I've now switched to using git without gui and when I want to make a commit I just double click this batch script:

    Code (csharp):
    1. git add --all
    2. git commit --all --message="commited by batch script"
    3. git push origin master
    4.  
    5. pause
    Even with a GUI tool I never wrote meaningful commit messages, so I might as well just do it like this. And it's sooooo much faster than sourcetree was.
     
    Reanimate_L and Ryiah like this.
  8. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    git good, git lit, git rekt. . . .



    i'm sorry. . . .
     
    Martin_H likes this.
  9. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    haha I like the naming suggestions. The reason I had picked "Git-It" was to feel like "Get It" as in do you get how to use git now and or did you git/get that change yet? Also the name was unique from other projects out there relating to git.

    And ya I tried source tree and ran into way to many issues that non technical people would have issues with. Thus I made my product to solve a real problem of there not being an open source, simple to use too that supported Git-LFS for game teams / general users.

    You end up saving yourself a lot of trouble by using a GUI tool to review your changes before a commit. If you end up trying out my tool, please submit issues you find.
     
    Martin_H likes this.
  10. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    "In my very limited experience with it, sourcetree was a pile of garbage. It had a bug that caused it to be ridiculously slow or even crash. "

    yup had those same problems, and finally it just stopped working altogether garbage is an appropriate description.

    I think this project looks pretty decent, I've found since using a gui client it's been very useful for checking commit logs on specific files and rolling back stuff that just didn't work out in changes made so looking at diff logs. Tbh that is where the gui git based tools can really shine, but also just in general ease of use in doing slightly more complicated git stuff, doing it via command line I dunno I can see tons of potential screwups being had.

    Shame this wasn't around last year when I tried a whole bunch of gui git based clients.. The one I use now isn't perfect because some parts of its design and preferences are less than great, but all in all I've come to like some of its more advanced stuff and ease of use, still its always good to see other alternatives come up, especially c# open sourced ones :)
     
    zezba9000 and Martin_H like this.
  11. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Are you aware of TortoiseGit? It's also quite minimalist, doesn't rely on copying a batch script, lets you choose what to add instead of adding all (which may be a bad idea), will detect when you've removed stuff (which yours won't?), and will allow you to easily write commit messages (which you should :p).
     
    Martin_H and Ryiah like this.
  12. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Thanks for the recommendations. I've heard of tortoise, and another kind of gui that looked rather minimalist got installed with my git version. But all I really wanna get out of this, is maintaining an online backup with just doubleclicking a script every now and then. Your comment about my solution not removing stuff had me concerned, so I double checked. I moved 2 files outside of the tracked folders, ran "git status", it complained about them missing, I ran my commit script and ran "git status" again, and it no longer complained.
    This is from the help file that "git help add" opens:


    Maybe you've been using an older version that behaves as you said?

    Me using a gui only would end up in either not commiting enough things to have a fully working copy of the project, or commit everything anyway like I do it now. My commit messages eventually all degrade to things like "various changes" or "optimiztion etc." or just ".". Might as well just stop pretending :D.
    I probably should mention that I never "just change code" in my project, I comment out the old line and add a modified copy of the old line when I make a change or try something out. Then I test if it worked. If it has been working for long enough (and most likely I've made a commit in between) I start deleting some of the commented out code. Unless my harddrive dies it is highly unlikely that I'll ever need to roll back anything from the backup.
    In other words I didn't choose git because I wanted version control, I chose it because I wanted convenient and free online storage that doesn't need to upload more than necessary when I changed something ^_^.
     
  13. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    TortoiseGit is probably one of the better tools that supports LFS but it still leaves around junk files in your repo after a merge etc. Which I can't stand personally and others get confused as to where those files come from. Like artists etc.
     
  14. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    Last edited: Feb 16, 2017
  15. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Oh, I wasn't comparing it to your tool, I was suggesting it as an alternative to a batch file.
    Nah, that question mark was genuine - I was asking because I didn't know. It looks like it will do that part fine, so no issue there.

    I'd also check to see whether it respects your .gitignore configuration, and whether you've got one in place, because there's quite a bit of stuff in many projects that ideally shouldn't be stored in your version control. If you're just using it as incremental storage as you describe then it might not be an issue.
     
    Martin_H likes this.
  16. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Good point! This is how my .gitignore looks like. It is mostly copied and modified from one that I found somewhere around here.

    Code (csharp):
    1.  
    2. # =============== #
    3. # Unity generated #
    4. # =============== #
    5. [Tt]emp/
    6. [Oo]bj/
    7. [Bb]uild/
    8. [Bb]uilds/
    9. [Ll]ibrary/
    10. sysinfo.txt
    11. # ===================================== #
    12. # Visual Studio / MonoDevelop generated #
    13. # ===================================== #
    14. [Ee]xported[Oo]bj/
    15. /*.userprefs
    16. /*.csproj
    17. /*.pidb
    18. /*.suo
    19. /*.sln*
    20. /*.user
    21. /*.unityproj
    22. /*.booproj
    23. git-auto-commit-and-push.bat
    24.  
    If I would commit everyting in Library etc. too, then I'd run out of storage space on gitlab soon I think.
     
  17. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    If you commiting the library you would also run into terrible merge conflicts all the time, and keep forcing people to wipe out there library all the time as well as causing issues on platform change.

    Also you should name your commits, it's pretty infuriating trying to find where a problem started and revert to it if the messages are all the same.

    If you are just commiting all with no message you might as well just be uploading zip files to a server via a script. Since your getting no benefits out of git by doing this.
     
    angrypenguin, wccrawford and Martin_H like this.
  18. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    I don't think this is the case, since metadata is local, it's not in the Library folder, they are hidden files in the Assets folder?

    Additionally, the platform change issues can largely be mitigated by setting up a cache server, which is very worthwhile anyway.
     
  19. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    most people use visible meta files to make it easy to version, yes meta files should be committed since they contain stuff like the guid and settings for assets.
    The library folder is what has per platform stuff, and is entirely generated from the assets and meta files, based on your build settings and thus can easily conflict with other users. So no point committing something that can be generated.

    I use the cache server at work, which allows users to sync the library for those using the same settings. It makes switching platforms and branches much faster, since instead of regenerating the data, it downloads a copy made by someone with the same project setup.
     
  20. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    I'm pretty sure that the Library is different if you are running a Mac vs PC. If you don't include the Library in your repository, you can easily work on the same project on a Mac or PC.

    Does anyone use Visual Studio for Git?
     
    Kiwasi likes this.
  21. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    Ah yes, sorry, I misread what you posted, I thought you meant that you should commit the library files. I need more sleep :)
     
  22. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    On the note of this stuff...
    ... when I started with version control I was pretty similar. I did write useful commit messages, but aside from that I did what you describe here. Indeed, I was basically using version control as just a storage system with infinite undo. That's a really handy thing to have, and is already a heck of a lot better than no version control... but you can do better. Much better.

    It starts with useful commit messages, because they're important to help you navigate later. If you're looking through a log that just says "Automated commit" for everything then you'd have to open every single changeset to find something. If you've got good labels then you can easily find the commit where you fixed that bug in your score system, because it'll be logged as "Fixed bug in score system".

    Next, get into the habit of deleting unused code. Not just things that are commented out, but anything you intend to not use. The cleaner your code files are the easier they are to work on, but that's only a part of the benefit here. The bigger part of the benefit is that when you look at some commented out code you're only getting a part of the story. When you look up that same piece of code in your version control history you get far more context - the code itself (so it's there if you want it back), but also when it was added, when it was removed, and ideally also the reasons.

    Next... branching. I went for ages without making use of this, and it does require a level of organisation, but it's super handy on large projects and/or with teams. In short, it lets you and/or your team members work on features in isolation, then merge them back into the mainline after you've tested them. It's not obvious, but this buys you huge flexibility gains for a variety of reasons. Have you ever been in a situation where you can't work on one feature because you're in the middle of another? Branches can solve that. Want to try implementing something different ways? Branches let you do that, then you can merge just the best one into mainline. Not sure if a feature is a fit for your game? Try it out, merge the branch (or don't) when you have your results. Team members want to work on things without stepping on each others' toes? Branches are great there, too.
     
    passerbycmc, Ryiah, 3agle and 2 others like this.
  23. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    My backup solution so far is to zip project settings & assets every day.

    If I would switch to GIT for the purpose of version control / back up and not collaboration, would the "Git GUI client" by @zezba9000 be a good way to get started or are there alternative recommendations for such a simple use case?
     
  24. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I personally would reccomend starting with a well supported client like GitHub Desktop or SourceTree. I've personally never had an issue, but see others comments above on the clients.

    The good news is it's super trivial to switch between clients. If one doesn't work out well for you, changing to another is fine.
     
  25. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    If you're the only person pushing to your repo, then any client that supports Git-LFS isn't going to be that hard to use.

    However if you work with others or work from multiple computers (in short put yourself in a situation that involves potential merge conflicts. GitHub Desktop doesn't have any merge tools and setting up one to use as a merge tool leaves junk files behind in git. SourceTree also leaves garbage files around as well... SourceTree's UI is also just confusing. TortisieGit normally does what you want but still sometimes leaves temp files around after a merge as well.

    With git you can also use multiple tools if one tool is better at something over another (or one tool has an advanced feature you need). My tool isn't designed to be another super feature rich over complicated/(everything in your face) kind of git client. Its focused on doing what most want/need to do 90% of the time. Syncing changes with the server, switching branches and merging them. There are also non-free tools that might be good, but if you want a simple to use, free tool that supports Git-LFS mine isn't a bad option. (thats my opinion)

    I wish gitkracken would support Git-LFS. Its one of the best free tools right now for git... but you can't use it with Unity for large projects as it doesn't support Git-LFS.
     
    Last edited: Feb 17, 2017
    Kiwasi likes this.
  26. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I thought I should let you know that because of your persistence, I've recently started writing commit messages ^_^. No branching for now though, but I see how it could be useful for team projects or when working on new features for a game that's already live on steam. There can always be a situation where I'll want to publish a quick bugfix without rolling out the more experimental new features I'm working on. But those things are far away in the future, right now I'd be more likely to shoot myself in the foot with branching/merging and I can't be bothered to "git gud" at it with a pure practice project right now.
    I do agree about the code removal thing. The main reason I'm "attached" to code and often rather comment out than delete, is that I don't use version control for long enough that I trust it to be 100% reliable, and trust myself not to mess up rolling back something from the repository. I see it more like a failsafe for when all else failed. I'll let you know when/if I recover something from my repo for the first time on this project :).
     
    angrypenguin likes this.
  27. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    This made me smile. :)

    Yep, trust in a system and your usage of that system is a huge concern. I did move on to each of the things I mentioned up there one step at a time, and over quite a while, so I was building that trust as I went. And I only moved to Git at all after doing a bunch of tests to see if the basics worked reliably. And, as you say, it's important to be reliably good with the things you're already doing before adding something else. One step at a time is certainly a good way to approach this stuff.

    I'm glad to hear about the commit messages, though. I find them useful in and of themselves, and they're a prerequisite for many other things to be practical.
     
    Martin_H likes this.
  28. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    Just updating post. I Updated the tool to use git-core via a C# interface I call GitCommander instead of libgit2. So now the tool supports ANY git filters, including git-lfs 2.x+ etc.

    It logs all commands in "C://ProgramData/Git-It-GUI/logs.txt"
    will make ui for this later.

    Link: https://github.com/reignstudios/Git-It-GUI/releases/
     
  29. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    New version has been ported to WPF for Windows.
    Every git command is thread safe avoiding any threading collision.
    UI has been massively improved / simplified and thread stabilized.
    Quick image diff has been added (also works with LFS images and merge conflicted files).
    Quick text diff is now colorized.
    Terminal / Log tab added etc.
    In short this is a pretty much a 1.0 release candidate.
     
    StevenP94 likes this.