I use this a lot, as well as Magit. Simple terminal commands work fine, but I like selecting what chunks of code I want to commit, and these tools make it especially easy.
My only gripe with Magit (I'm not sure how Lazygit does with this) is how hard it is to search a large commit log. l l will pull up a truncated list of commits that you can search in, but if the commit you want isn't in that list, you have to keep requesting a handful more commits at a time to search in. I find it can be faster to just use git log and search in my pager instead. Otherwise Magit is a fantastic piece o…
Lazygit: Simple terminal UI for Git commands
61–70 of 82 posts
Re: Lazygit: Simple terminal UI for Git commands
#62I found lazygit after building something of my own thay solves some of these problems for me - git-fuzzy [0]. I'd like to share some of my thoughts about the comparison. lazygit is a TUI for git which can behave in a standalone fashion. It's also designed to be quick and easy to use to perform quite advanced actions but ones that a seasoned git user may really want when working with git history. Since I'm already a s…
Interesting project... in the hopes of maybe nerd-sniping you (or having someone tell me where it already exists), I'll tell you the story I'd really like a solution to but can never seem to find time to build: I have 5 un-pushed commits. I missed a 1-line change to that first one. I add that one line change to staging (gitui/lazygit/whatever), then I want to `git commit --fixup=COMMIT`. Finding that COMMIT is always…
It’s not quite as automatic as you describe, but it’s super quick if you vaguely know what commit you want to amend and there’s no magic happening: just a good ui
Re: Lazygit: Simple terminal UI for Git commands
#63Looks rather nice when looking at, but I have to say that (for me) the animations in the github page are way to fast to get any feeling of what the tool does.
Re: Lazygit: Simple terminal UI for Git commands
#64Earlier quoted context omitted.
I usually solve this by commiting my fixup in a dummy commit, then do a rebase -i HEAD~n where n is the number of commits I want to look back at. Then during the rebase I just move my commit below the one that seem the most appropriate and mark it for squash. Execute the rebase. Done
Wow, I never realized that changing the order of commits in an interactive rebase was a legit operation. Thanks for the tip!
If you've already made the change but haven't committed it, you can stash it before doing the rebase, then pop the stash while editing that commit.
Re: Lazygit: Simple terminal UI for Git commands
#65Re: Lazygit: Simple terminal UI for Git commands
#66I found lazygit after building something of my own thay solves some of these problems for me - git-fuzzy [0]. I'd like to share some of my thoughts about the comparison. lazygit is a TUI for git which can behave in a standalone fashion. It's also designed to be quick and easy to use to perform quite advanced actions but ones that a seasoned git user may really want when working with git history. Since I'm already a s…
Interesting project... in the hopes of maybe nerd-sniping you (or having someone tell me where it already exists), I'll tell you the story I'd really like a solution to but can never seem to find time to build: I have 5 un-pushed commits. I missed a 1-line change to that first one. I add that one line change to staging (gitui/lazygit/whatever), then I want to `git commit --fixup=COMMIT`. Finding that COMMIT is always…
fzf (absolutely incredible tool with many uses) gives you fuzzy searching of anything you care to name, and fzf-git combines this with shell key bindings to let you pop up a fuzzy-searchable list of branches/commits/tags/whatever while typing your fixup command, then paste the object you select into your in-progress command line.
No more counting commits in log output to know how many ^ to put after HEAD, or copying out segments of commit SHAs!
Re: Lazygit: Simple terminal UI for Git commands
#67Earlier quoted context omitted.
Interesting project... in the hopes of maybe nerd-sniping you (or having someone tell me where it already exists), I'll tell you the story I'd really like a solution to but can never seem to find time to build: I have 5 un-pushed commits. I missed a 1-line change to that first one. I add that one line change to staging (gitui/lazygit/whatever), then I want to `git commit --fixup=COMMIT`. Finding that COMMIT is always…
I usually solve this by commiting my fixup in a dummy commit, then do a rebase -i HEAD~n where n is the number of commits I want to look back at. Then during the rebase I just move my commit below the one that seem the most appropriate and mark it for squash. Execute the rebase. Done
frbi = "!f() { git rebase -i $(git log --pretty=oneline --color=always | fzf --ansi | cut -d ' ' -f1)^ ; }; f"
I do: `git frbi` (which in my mind means Fzf ReBase Interactive)Then I can easily scroll up to the commit I want to start the rebase on.
Re: Lazygit: Simple terminal UI for Git commands
#68Lazygit for me brings over the feature that made GitX the greatest and that was the way it allowed to quickly and easily select a few lines of changes from each file and add them to the index for commit or amend them to a different commit. Lazygit even ramps this up with a lot of nice tooling around interactive rebase (like reordering, editing commits directly, squasing, deleting commits, reword, etc) which makes it a feast instead of a file editing/context juggling chore.
Re: Lazygit: Simple terminal UI for Git commands
#69Earlier quoted context omitted.
Interesting project... in the hopes of maybe nerd-sniping you (or having someone tell me where it already exists), I'll tell you the story I'd really like a solution to but can never seem to find time to build: I have 5 un-pushed commits. I missed a 1-line change to that first one. I add that one line change to staging (gitui/lazygit/whatever), then I want to `git commit --fixup=COMMIT`. Finding that COMMIT is always…
Lazygit allows you to easily « add » your stated changes to any commit (doing a rebase under the hood). Stage stuff, find the commit (the UI helps to quickly find the right commit) and press « a » for amend. It’s not quite as automatic as you describe, but it’s super quick if you vaguely know what commit you want to amend and there’s no magic happening: just a good ui
Re: Lazygit: Simple terminal UI for Git commands
#70Earlier quoted context omitted.
Interesting project... in the hopes of maybe nerd-sniping you (or having someone tell me where it already exists), I'll tell you the story I'd really like a solution to but can never seem to find time to build: I have 5 un-pushed commits. I missed a 1-line change to that first one. I add that one line change to staging (gitui/lazygit/whatever), then I want to `git commit --fixup=COMMIT`. Finding that COMMIT is always…
https://github.com/tummychow/git-absorb Does a very nice job of this for me.
This looks like exactly what I wanted. Thank you!