Live data from Hacker News

The lazy Git UI you didn't know you need

bwplotka.dev

61–70 of 224 posts

Re: The lazy Git UI you didn't know you need

#61
I've found the built in gitk is pretty good for some GUI tasks. If I want to view the sate of some file at a given commit, it's easier to navigate using that rather than going through git log, find and copy the commit, git show, paste, copy the file path. GitHub desktop didn't seem to have this feature last I checked, even though the GitHub web viewer does.

Re: The lazy Git UI you didn't know you need

#62

"git gui" is not just a wrapper for commands; it has usefully different workflows. For instance, you can visually select a range of lines in a file, and stage those lines. This is much easier than doing "git add --patch" and using edit, where you are deleting unwanted lines starting with +, turning - lines into context and whatnot. I have found it useful to fire up "git gui" during rebase workflows with conflicts. It…

> For instance, you can visually select a range of lines in a file, and stage those lines. Isn't this the standard for every Git GUI? Are there people who use a GUI that can't do that?

No idea; I don't know every git gui; I'm talking about that Tcl/Tk thing that is literally run with "git gui".

It would be pretty pointless to go out of the way to use something that doesn't come from the git project, yet is less capable (unless it had some overriding killer feature for the sole sake of which it was invoked).

Re: The lazy Git UI you didn't know you need

#63
Lazygit is great, I use it all the time for straight forward git-fu.

I do recommend turning off force push (there is an option), as it's easy to fat finger and leads to a whole lot of heartache.

But if you do any advanced work that involves merging a complex codebase across multiple branches, with generated code and multiple languages; and having to manage your load of conflicts, I find Fork[1] (the free version does fine) still takes the cake for that, as the clarity and lack of keyboard bindings, is essential; to make good, conscious decisions.

[1] https://git-fork.com

Re: The lazy Git UI you didn't know you need

#64
In the example of how they were removing specific lines from the previous commit, git gui had a way to do that instead of copying the diff lines and manually editing them back into the code:

git gui → Amend Last Commit → (select lines from a file in the Staged Changes area) → Unstage Lines From Commit → Commit

I still think it's the perfect does-just-enough GUI when the main thing you want is to visually craft commits.

Re: The lazy Git UI you didn't know you need

#65
Am I the only one who simply doesn't mind Git's CLI?

Sure, it's rough around the edges, but I know those edges well. I sometimes do need to look up how to do something, but those cases are rare. Over the years I've accumulated about a dozen shell aliases and a modest `.gitconfig`, and along with a couple of helper tools[1][2], I can do 90% of what I need Git for in seconds. I truly don't need a fancy TUI, GUI, or any wrappers around Git. Git itself is fine.

I tried Magit a few times, and even though Emacs is my main editor, I couldn't get used to it. It forces the user into doing things the "Magit way", and I'd rather not.

I don't understand the push to replace Git's porcelain with something shinier. If, and when, a better VCS comes along that truly feels like the next step forward, I'll give it a try. In the meantime, Git does the job I need.

[1]: https://github.com/mroth/scmpuff

[2]: https://github.com/dandavison/delta

Re: The lazy Git UI you didn't know you need

#66
post #27

Personally I just couldn't see all the extra layers as comfortable tools. It's a very rare thing that I need to see branches, relation between them etc. Using cli has always been the most reliable and simple way for me.The only git tool I need apart from cli is a convenient conflict resolver.

> It's a very rare thing that I need to see branches, relation between them etc.

And when you do, git log has "--graph --oneline" to do just that.

I have an extended version in a bash function because I do do it often and it's much easier/faster than opening a separate tool.

Re: The lazy Git UI you didn't know you need

#67
post #7

You might laugh, but in years of serious development, I have not come across a better git UI tool than SourceTree. If I want to be hard-core, I'd use the original git CLI. SourceTree is unmatched in how it makes using git so much more pleasant for when you need to do something relatively simple, but which would be quite cumbersome to do with the CLI and most other tools I've tried. Its file status and history view is…

Now I've got to mention Sublime Merge as my personal favorite: super fast, nice clean UI on all platforms, still maintained, single purchase license.

Re: The lazy Git UI you didn't know you need

#68
post #36

Earlier quoted context omitted.

I can't live without Fork. It's the one thing I miss on Linux. I have it in Wine, but it's running terribly there unfortunately.

I’ve used SourceTree for a decade, Fork is the only one I’ve switched to partially (at work). I probably will switch back to ST even at work because I dislike: - I want the split view of ST where I can simply see the changes and not lose the commit log. - “see only current branch” is super useful in ST to see only the current branch’s commit log. (Partially writing this in hopes of someone pointing out ways to do thi…

You can do "see only current branch" with the little filter icon when you hover next to a branch. Although I do find myself getting lost amongst branches more easily compared to Sourcetree, I think there's some difference in how filters are combined that isn't ideal (but I can't remember specifics)

Re: The lazy Git UI you didn't know you need

#70
post #67
post #7

You might laugh, but in years of serious development, I have not come across a better git UI tool than SourceTree. If I want to be hard-core, I'd use the original git CLI. SourceTree is unmatched in how it makes using git so much more pleasant for when you need to do something relatively simple, but which would be quite cumbersome to do with the CLI and most other tools I've tried. Its file status and history view is…

Now I've got to mention Sublime Merge as my personal favorite: super fast, nice clean UI on all platforms, still maintained, single purchase license.

Big fan of sublime merge. I recommend it a lot to people who need to dip their toes in source control and want some layer of abstraction, but also want to feel like they’re connected to the underlying tool (git). Merge balances this very well.
Post reply on HN