simple terminal UI for git commands
Hold on tight because this is a HUGE release! This release includes a whopping 595 commits from a period of over 7 months, from 40 different contributors. Thanks to everybody who made this possible, and apologies for taking so long to actually release it: we'll be more frequent in future!
Special thanks to Stefan Haller who is behind many of this release's changes and who has been critical in getting this release across the line.
I've made a video running through the big changes here:
Here's some highlighted features:
You can now press 'v' to toggle range select in any list view, just like you already could in the staging view. You can also press shift+up/down to select a range. You can use range select to:
I have been waiting for this feature for a very long time and it's already made me way more productive. If I need to squash a range of commits I can now easily do it directly rather than needing to squash them one-by-one, or needing to manually start an interactive rebase first. Likewise, it's much easier to select a range of files and stage them than stage them one-by-one.
This is a Breaking change: Unfortunately, the 'v' key clashes with the existing key for pasting commits (cherry-pick), so we've replaced that with shift+V and changed the commit copy key to shift+C. If you want the old keybindings back, you can do that like so:
keybinding:
universal:
toggleRangeSelect: <something other than v>
commits:
cherryPickCopy: 'c'
pasteCommits: 'v'
The commit editor now automatically hard-wraps your content by default, so you no longer need to hit the enter key yourself when you approach the margin. You can disable/configure this in your config:
git:
commit:
autoWrapCommitMessage: true
autoWrapWidth: 72
Thanks to @stefanhaller for this feature.
Now when you go to checkout a remote branch, either via the c
keybinding in the branches view or by pressing space
on a remote branch, you'll be given the choice to checkout as a local branch or as a detached head (previously it would just check it out as a detached head which typically isn't what you want). This is a Breaking change in terms of muscle memory.
Thanks to @stefanhaller for this feature.
Previously, to start an interactive rebase, you would need to navigate to a base commit and press e
on it. Now you can simply press i
and regardless of which commit is selected, an interactive rebase will begin that includes all the commits on your branch (or if there are merge commits: all the commits up to first merge commit).
The above demo for range select showcases this.
fixup!
commitsIn a similar vein to the above section, now when you press shift+S
, you're given the choice of squashing all commits above the selected commit and squashing all commits on the branch, which is what you typically want. This is a Breaking change in terms of muscle memory.
Thanks to @stefanhaller for this feature.
If you press u
on a local branch a menu appears which shows options relating to the branch's upstream. Now, the first option in that menu allows you to view the divergence from the upstream which shows commits to pull and commits to push
Thanks to @stefanhaller for this feature.
This one is some serious voodoo: if somebody suggests changes in a PR review, you'll often apply the changes, then go hunting for the appropriate commit to fixup/amend. Now, from the files view you can press ctrl+f
and if Lazygit can identify an appropriate commit with certainty, it will select that commit for you. Pretty cool!
We've made the algorithm very strict so that you can always trust the result, but this means in circumstances where we can't know for sure which commit is appropriate (such as when your changes only include added lines), it's left to you to manually find the commit. We're keen to get lots of feedback on this feature to see where the sweet spot is.
For more info see the docs
Thanks to @stefanhaller for this feature.
Now when you press d
on a local branch, remote branch, or tag, you're given the option to delete that branch/tag in the remote.
Thanks to @AzraelSec for this feature.
When you press a
on a commit an option now appears to add a co-author (something GitHub can read).
Thanks to @omaussa for this feature.
You can now filter commits by author via pressing ctrl+s
in the commits view and selecting the option to filter by author.
Thanks to @Part22 for this feature.
You can now change branch sort order by pressing s
in the branches view (and remote branches view). By default local branches are sorted by 'recency' meaning how recently they were checked out, but you can now sort by head commit date and alphabetically.
Thanks to @hosaka for this feature.
We have fixed a bunch of bugs relating to bare repos so if you had issues with them in the past it should work fine now.
Thanks to @jwhitley for this feature.
ctrl+L
-> 'Show git graph' -> 'when maximised'gui:
filterMode: 'fuzzy'
gui.scrollOffBehavior
config for scrolling list views by half-pages by @stefanhaller in https://github.com/jesseduffield/lazygit/pull/2939
diff
copy options) by @AzraelSec in https://github.com/jesseduffield/lazygit/pull/3104
Error
method to handle commits url copy from unknown service by @AzraelSec in https://github.com/jesseduffield/lazygit/pull/3007
git diff
was customized with config (e.g. external
or noprefix
). by @mricherzhagen in https://github.com/jesseduffield/lazygit/pull/3222
test/results
to test/_results
by @stefanhaller in https://github.com/jesseduffield/lazygit/pull/3012
len
check by @Juneezee in https://github.com/jesseduffield/lazygit/pull/3051
yaml:"options"
struct tag to CustomCommandPrompt
.[]Options
by @lexor in https://github.com/jesseduffield/lazygit/pull/3163
I quit my day job and co-founded Zenbu, a startup that helps your company manage its SaaS subscriptions (discovery of subscriptions, onboarding/offboarding etc) to save you time and money. Check it out! https://zenbu.au/
Full Changelog: https://github.com/jesseduffield/lazygit/compare/v0.40.1...v0.40.2
Full Changelog: https://github.com/jesseduffield/lazygit/compare/v0.40.0...v0.40.1
Holy moly, has it really been 5 years since Lazygit's birth? Time flies when you're having fun.
I've written a post celebrating the anniversary here.
As for this release, we've got some great features here.
We now have a worktrees view so you can easily create worktrees and switch to them and so on. I'm not a big worktrees user myself so please raise an issue if you can think of places to improve the UX.
Rebasing onto a marked base commit is a very useful feature that we've been sorely lacking for a while (demo coming soon)
Auto-refresh on window activation is a complete game-changer. No more having to manually press shift+R when you come back from your editor.
We also have a fun enhancement in this release: showing an explosion animation when you nuke the working tree.
You'll also notice in the readme we've got some updated demo gifs to showoff Lazygit's features. More of those to come.
null
to un-map a keybinding was ignored by @hatredholder in https://github.com/jesseduffield/lazygit/pull/2832
Full Changelog: https://github.com/jesseduffield/lazygit/compare/v0.39.4...v0.40.0
Full Changelog: https://github.com/jesseduffield/lazygit/compare/v0.39.3...v0.39.4
Full Changelog: https://github.com/jesseduffield/lazygit/compare/v0.39.2...v0.39.3
This release fixes an issue on windows where the main view would stop rendering new content. This issue mostly affected users running git through a shim. Thanks to @AndrewSav for the investigation and fix https://github.com/jesseduffield/lazygit/pull/2806
Full Changelog: https://github.com/jesseduffield/lazygit/compare/v0.39.0...v0.39.1
There's lots of stuff in this release! Some favourites of mine include:
gui.showBranchCommitHash: true
)As you can see @stefanhaller is behind many of the improvements in this release so kudos to you Stefan! And thanks to all the contributors who made this release possible.
In the next release we're adding worktree support. It's a big feature so we want to get it right! If you use worktrees as part of your daily flow please respond to the poll (and even test out the draft PR) in the Worktree UX discussion
git init
prompt by @jesseduffield in https://github.com/jesseduffield/lazygit/pull/2771
github.com/jesseduffield/yaml
package by @Ryooooooga in https://github.com/jesseduffield/lazygit/pull/2508
If you contributed to this release but don't see your name here, let me know!
Full Changelog: https://github.com/jesseduffield/lazygit/compare/v0.38.2...v0.39.1
Full Changelog: https://github.com/jesseduffield/lazygit/compare/v0.38.1...v0.38.2
In v0.38.0 we displayed branch markers in the compact commits view, but this caused some confusion as it wasn't very clear what the markers represented. We're going to revisit the UX for this before considering re-introducing it. If you would like to re-enable the feature, set gui.experimentalShowBranchHeads
to true
in the lazygit config. As the name suggests, this is experimental and we may change this config in the future.
Full Changelog: https://github.com/jesseduffield/lazygit/compare/v0.38.0...v0.38.1