1

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 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. – Tyler Shellberg Mar 11 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 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. – Tyler Shellberg Mar 11 at 20:38

Your Answer

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

Browse other questions tagged or ask your own question.