I'm looking for a good tool to help me when making git commits. (Maybe viewing history as well)

Specifically, I want something that allows me to, using a gui:

  1. Very easily add files, do patch-add, hunk editing, patch-checkouts, etc. I do this constantly, making it easy would be a great help. I don't want that feature to be secondary. I almost wish I could simultaneously group multiple uncommitted changes into different "pre-commits" that I could later decide the order on too, but I doubt anything supports that. It's a little tiring to do it all via CLI.

  2. Automatically warn about >50 character commit messages, force limit to 80 character length lines in messages, maybe wrap at 72 for indentation (Or a custom setting, but those defaults are fine) and ensure capitalization on first word, no period at end, etc. Heck, if it can warn about imperative mood that'd be great too. (Though I suspect that's much harder) I don't make these mistakes often, but I want something to catch them if I do.

  3. If possible, view history. I use Gitk for this, and rolling this all into one tool would be nice. Plus, Gitk is a little lacking visually.

I'd also like the following properties:

  • Easy to install and set up.
  • Should work with existing, private repositories that are self-hosted (IE, doesn't require some tie to Github/etc) This eliminates Git Kracken unfortunately.

For reference, my current workflow is:

  1. Make large lump of changes
  2. Go into command line, decide which of the groups of changes I want to commit first, and begin going through each file and do git commit add -p [filename], add all the relevant changes, edit or split hunks when necessary.
  3. Once all files are done for this commit, go into QTCreator, use the Tools->Git->Local Repository->Commit, write the message since it automatically line-breaks at 80 characters so I can't make a mistake.
  4. Go back into CLI and push if I'm going to
  5. Get the do git log to get the commit messages I made for other uses.

One tool to handle let me do all of that instead of a mixture of Gitk, command line and QTCreator would be amazing.

  • 1
    Not sure if it fits your bill: can you take a look at my answer here? Gitcola can do much of what you list, if I understood that correctly. I usually launch that when I want to split my changes across multiple commits, for example. And it also warns/alerts at too long commit messages (color goes from green via yellow to red, with red at ~80 chars).
    – Izzy
    Mar 10 '20 at 21:39
  • Just tried git-cola for awhile - it definitely fits many of the requirements. Unfortunately, apparently it is impossible to edit hunks in the diff view and I do not know any way to do it aside from opening a command line to do so. I may end up using it anyways though as it still cuts out some of my tools needed. Mar 11 '20 at 18:39
  • By "edit hunks" you mean "change contents"? OK, that I never tried. But marking and "add selection" works, did that a couple of times.
    – Izzy
    Mar 11 '20 at 20:26
  • 1
    Yes. You can select what pieces of a hunk to either revert or stage, but you cannot actually change what is in the hunk, which is what I meant by hunk editing originally. IE, if I changed a line to both modify the name of a variable, and its value, I cannot make those into separate changes. They're part of the same hunk, on the same line. With git add -p and the e command, you can do that. Mar 11 '20 at 20:38

There is one git client that suits all your requirements - it's the git client integrated in Eclipse IDE - I believe it's called EGit. It's the ONLY GUI client that I've found that has ability to edit hunks (you can actually edit whatever you want, even without adding any hunk/line). It only has one downside, which is... Eclipse (; OK, two downsides - Eclipse & Java. Generally with each version it has more and more bugs/glitches, yet it is still the best thing I've tried.

As I stopped using Eclipse as my main IDE and debugger, I now use it as a git client only. Probably a strange workflow, yet the set of features it has outclasses any competition I've seen.

To be honest, I'm constantly looking for an alternative, however each client I've found doesn't have the first feature you mentioned. For me the ability to manually edit the staged hunks is a "must have", so if you found any other GUI client, let me know too (;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.