12 ms·
Lazygit: A simple terminal UI for Git commands
- jmcphers 5y agoAnother great terminal UI for git is tig: https://jonas.github.io/tig/ https://jonas.github.io/tig/
- aequitas 5y agoTig is great for visualising and stepping through history but for quickly performing other Git related task I found it was missing something. That something turned out to be exactly Lazygit.
- zem 5y agoi've been using [gitui](https://github.com/extrawurst/gitui https://github.com/extrawurst/gitui) for that. lazygit does seem like it has more features though
- Mulderns 5y agoI use tig exclusively to stage commits. Alias tigs='tig status' lets me select / discard lines.
- sli 5y agoSwitched from regular terminal use to lazygit shortly after this was released and have never looked back. I still do more complex git stuff manually, but my usual git workflow is totally covered by lazygit.
- buf 5y agoI use lazygit a dozen times or more per day. As a tmux+vim user w/lazygit, I don't think I've touched my trackpad in years, and it still feels like a modern interface and faster than all the IDEs out there.
- outlawBand 5y agoI don't care how lame it makes me...I love my GitHub Desktop app. I will give this a go!
- cbeley 5y agoI've been a huge fan of lazygit. You can even do side-by-side diffing if you combine it with the "delta" pager. For me, it feels really similar to "gitx", which was mac only and stopped being maintained. Having it just be in my terminal is a bonus.
- simonblack 5y agoIf I'm already using an xterm, why would I use lazygit? It seems to me to be a solution in search of a problem. It looks to be nice but it merely adds an extra level of complexity.
- ahurmazda 5y agoA very satisfied user. As a (neo)vim user, I did suffer from magit envy but at the end, Lazygit takes care of all my needs. I prefer the UX (Just a personal preference). Kudos to the dev for the wonderful tool PS: There is also lazydocker by same person https://github.com/jesseduffield/lazydocker https://github.com/jesseduffield/lazydocker
- hanklazard 5y agoWow, thanks … lazydocker looks really great
- the_duke 5y agoThere even is a Neovim plugin which can open lazygit in a floating window. The active Neovim instance will be used for multiline commit messages. https://github.com/kdheepak/lazygit.nvim https://github.com/kdheepak/lazygit.nvim
- ahurmazda 5y agoNice. I have it hooked up to the toggleterm plugin [0]. This way I can pop layzgit and other things (gdb, ipython etc) on a floating term [0] https://github.com/akinsho/toggleterm.nvim https://github.com/akinsho/toggleterm.nvim
- 7kay 5y agoMay I ask what made you choose lazygit instead of fugitive? I'm using the latter and am quite happy with it, but I'm keen to learn what I'm missing out on.
- stavros 5y agoI use both, though I only use fugitive for "git blame" and I use Lazygit for log browsing and partial staging. With me, it's just what tool will stick, fugitive might be great but I just don't stick with it. Same with editors, I really want to like VS Code but in the end I just open vim by default again.
- throwaway984393 5y agoLooks awesome. It almost seems arcane now to write a program that is only is designed to make a person's everyday life simpler and easier. I love the idea of programs like this, but then I find myself nit-picking over whether I want it to be console, graphical, web... There's no such thing as a UI framework that works for all three, right?
- avgcorrection 5y agoI guess Emacs is a sort of UI framework, considering Magit.
- not-my-account 5y agoLazygit is terrific. I started learning git on the command line, and had that pompous opinion that "GUIs are a crutch" - but with Lazygit, I am so much faster, doing everything - comiting, squashing, rebasing, etc. I can't recommend it enough.
- peterhil 5y agoImpressive, although quite large program! One suggestion: Use PgUp and Pgdown to scroll a screenful, and use arrow keys to scroll one or two lines. Use shift with some keys to scroll half screens. Is there a keyboard shortcut to go into remotes or tags panes?
- jesseduffield 5y agoYeah I regret using pgup/pgdown for regular scrolling in the beginning. I'm gonna add keybindings for paging up and down properly (so that a user can remap those to pgup/pgdown) and I think down the line I might change that to be the default behaviour, but it's tricky when it comes to keybindings people are now familiar with after using the app for a while.
- canadaduane 5y agoGlad you're thinking about this. It was the first "bump" I hit as a new user.
- chada 5y agoI found that ] and [ cycle through Local Branches, Remotes and Tags.
- softwaredoug 5y agoI maintain a bunch of git aliases in my .gitconfig for my company's rebase based workflow. They cover 90% of my 'dumb' git usages synced = pull origin master --rebase. # Update myself with master squash = rebase -i origin/master # Let me optionally squash whatever has happened since master publish = push origin HEAD --force-with-lease # Save to orig in (github) pub = push origin HEAD --force-with-lease # Save to origin (github) ammend = commit --amend # I cannot spell this word for the life of me amend = commit --amend
- dstroot 5y agoI use Oh My ZSH git aliases. Examples: gcmsg "git commit -m" - Git commit message gco "git checkout" - Change branch gd "git diff" - Files differences in staging gl "git pull" - Pull from remote gp "git push" - Push to remote --- Tool looks interesting!
- agilob 5y agoohmyzsh has git plugin and a few other git-related plugins with these aliases already available https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/README.md https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/R...
- agilob 5y agoIf you use zsh and ohmyzsh you have these commands available in `git` plugin with full docs here https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/README.md https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/R... A must read for every cli git user.
- epage 5y agoI used to use aliases but got frustrated with them when dealing with PRs depending on PRs, so I wrote git-stack [0]. Thought I'd share in case you'd find it useful [0] https://github.com/epage/git-stack/blob/main/docs/reference.md#git-stack https://github.com/epage/git-stack/blob/main/docs/reference....
- julius_deane 5y ago
- jordanmorgan10 5y agoIf there is one thing that terrifies me it's using Git, or any source control, from the command line. No matter how long I've been in this industry, I just can't get cozy with doing a lot of heavy lifting in any shell environment. Give me the GUI all day every day.
- agilob 5y agoExactly the opposite for me. I absolutely do not trust GUIs to do the right thing. I don't trust text area to use correct line endings consistently across platforms, I don't trust them to be up to date with new options for `commit` or `checkout`, they never show examples what result will be (--dry-run). None GUI is ever up to date with documentation and contains all functionality which I can autocomplete with [tab][tab] in zsh. Does any GUI offer `-p` in `git commit` and `git stash`? I literally use it 10s times per day, can't live without it once I started using it.
- Groxx 5y agoLiterally every git GUI I've used has screwed up a git repository at some point, requiring relatively-advanced CLI use to untangle it. They're wildly untrustworthy IMO. They also almost never perform reasonably on truly large repos, aside from gitk. Since using a GUI has inevitably required me to learn CLI in depth, and adds the complexity of figuring out what the hell the GUI actually did because of course it doesn't tell you, I'm basically 100% CLI as well.
- reificator 5y agoI was also in this boat, but vscode has been reliable for me. Maybe I’m not clicking the wrong options, but I used the gut cli exclusively for years so maybe my mental model is in the right place to avoid that.
- agilob 5y ago>Literally every git GUI I've used has screwed up a git repository at some point, I got burnt by this with svn... when unfucking things was a lot more complicated and required faster disk and connection.
- giglamesh 5y agoLooks pretty great, but: Error! Your Xcode (13.0) is too outdated I don't have the luxury of upgrading yet. This requirement seems overly fussy and opinionated.
- ripley12 5y agoSo download a binary instead of building it from source?
- giglamesh 5y agoCame here to whine, got a what seems in retrospect to be a perfectly obvious and simple _solution_. Thank you!
- Groxx 5y agoI believe that's coming from homebrew itself, which is pretty aggressive about updating everything. The homebrew formula contains no reference to xcode version, for example: https://github.com/Homebrew/homebrew-core/blob/master/Formula/lazygit.rb https://github.com/Homebrew/homebrew-core/blob/master/Formul...
- giglamesh 5y agoGood call. Thanks!
- boojing 5y agoMagit is another popular alternative for emacs https://magit.vc https://magit.vc I wonder if anyone has gone from lazygit to magit or the other way around. As someone who uses emacs for my day to day dev work I can't see myself changing.
- pkd 5y agoNot that I would switch away from Emacs itself, but I can see myself using Emacs just for Magit even if I was not using it for anything else. Magit is just that good. (Consider sponsoring Jonas on Github if you use and love Magit so that he can keep making it awesome. https://github.com/sponsors/tarsius https://github.com/sponsors/tarsius)
- metta2uall 5y agoThe edamagit extension for VS Code is also fairly good: https://marketplace.visualstudio.com/items?itemName=kahole.magit https://marketplace.visualstudio.com/items?itemName=kahole.m...
- tigerlily 5y agoJesse you're leaking email addresses in your interactive rebasing example animated gif.
- xaduha 5y agoIf someone wanted to get those emails they could get them from git any number of ways, analyzing animated gifs would be somewhere near the bottom of that list.
- andrethegiant 5y agoI guess it takes getting used to, but at first glance, the screenshots of lazygit look more complicated to me than git's normal stdout.
- hyperpallium2 5y agoThe first git command to be taught to beginners should be reflog.
- thebruce87m 5y agoAm I missing something with Ubuntu? Is it really deprecated? What’s the best way to install and keep up to date on Ubuntu?
- ilaksh 5y agoI think that it's just difficult to submit updates to Ubuntu or get them incorporated. I think you can just download the binary and put it in /usr/bin or clone and run go install as per the instructions.
- smallerfish 5y agoThat's bad practice though. Devs should be comfortable having older (security patched) versions of software in repos, which provide a valuable service for users. It's hostile for devs to push PPAs only, as it implies that their ability to push updates faster is more important than the distro's review process.
- ducktective 5y agoTake the nix pill
- francislavoie 5y agoLinus Torvalds about this: https://www.youtube.com/watch?v=Pzl1B7nB9Kc https://www.youtube.com/watch?v=Pzl1B7nB9Kc Distros (Debian in particular comes to mind) have some really annoying packaging rules, and as a maintainer of a Go program, it's a huge pain, so we decided to just set up a repo with https://cloudsmith.com/ https://cloudsmith.com/ instead of trying to deal with that. They require every dependency (indirect or not) to be packaged separately. We don't have the time for that. Way simpler to just build a static binary and ship it.
- vikinghckr 5y agoVery interesting project! This is one area where I always felt git was worse than mercurial. Latter has extremely useful tools like `hg hisedit` and `hg split`, for which git didn't have a counterpart.
- 999900000999 5y agoThank You ! Going to install this tonight, does it work well with LFS?
- acherion 5y agoThis looks great, looking forward to trying it out. I am kind of getting X Tree Gold vibes, great to see that the UI colours are customisable, I might have a crack at giving this an X Tree Gold theme / look.
- alxndr13 5y agouse it all day for all my development work, really cool to see it on the front page :)
- tiernano 5y agoseen the name, had to laugh... I actually own the domain lazygit.net... when i bought it, it was more for the idea that git is slang (https://en.wikipedia.org/wiki/Git_(slang) https://en.wikipedia.org/wiki/Git_(slang)), which, actually, while reading on Wikipedia, seems one of the reasons Linus picked the name (https://en.wikipedia.org/wiki/Git#Naming https://en.wikipedia.org/wiki/Git#Naming)...
- phist_mcgee 5y agoFulltime lazygit user here. Honestly, this program is the best of both worlds, a fast keyboard friendly gui, with the ability to interact with git as if it were you typing the commands by hand. Protip: alias lg="lazygit"
- nanis 5y agoI tried (just like I tried a whole bunch of other things). I get this both in `cmd` and in `ConEmu` on Windows 10 Pro-64 bit (Version 10.0.19043.1387). After the crash, all the enhanced console functionality is gone. panic: '%' is not recognized as an internal or external command, operable program or batch file. goroutine 39 [running]: github.com/jesseduffield/lazygit/pkg/commands.(*BranchListBuilder).obtainBranches(0xc00039bef0, 0x1367340, 0x10000, 0x0) /home/runner/work/lazygit/lazygit/pkg/commands/loading_branches.go:43 +0x693 github.com/jesseduffield/lazygit/pkg/commands.(*BranchListBuilder).Build(0xc0000dbef0, 0x11315f7, 0xc0000a4690, 0x1326e87) /home/runner/work/lazygit/lazygit/pkg/commands/loading_branches.go:103 +0x52 github.com/jesseduffield/lazygit/pkg/gui.(*Gui).refreshBranches(0xc0000b8000) /home/runner/work/lazygit/lazygit/pkg/gui/branches_panel.go:69 +0xc6 github.com/jesseduffield/lazygit/pkg/gui.(*Gui).refreshReflogCommitsConsideringStartup.func1() /home/runner/work/lazygit/lazygit/pkg/gui/commits_panel.go:69 +0x45 github.com/jesseduffield/lazygit/pkg/utils.Safe.func1(0xb35af5, 0xc000055da0) /home/runner/work/lazygit/lazygit/pkg/utils/utils.go:95 +0x2b github.com/jesseduffield/lazygit/pkg/utils.SafeWithError(0xc00039bfb8, 0x0, 0x0) /home/runner/work/lazygit/lazygit/pkg/utils/utils.go:106 +0x67 github.com/jesseduffield/lazygit/pkg/utils.Safe(0xc00008aa40) /home/runner/work/lazygit/lazygit/pkg/utils/utils.go:95 +0x50 created by github.com/jesseduffield/lazygit/pkg/gui.(*Gui).refreshReflogCommitsConsideringStartup /home/runner/work/lazygit/lazygit/pkg/gui/commits_panel.go:67 +0xa9 Before the crash, the UI is drawn reaaaaallyyy slowly (my cmd window is 170 characters wide -- maybe that's why) In any case, I prefer to stick with the command-line.
- jesseduffield 5y agoThanks for adding the stack trace. I've made a bug issue to track this https://github.com/jesseduffield/lazygit/issues/1601 https://github.com/jesseduffield/lazygit/issues/1601 and I'll take a look into it tonight. I'll need to dig into why our windows integration tests don't catch this (it appears to be a windows-specific problem)
- p2t2p 5y agoI recently grew fond of Gitfox. Has been using it for couple months and am very happy with it. Prior to that I couldn't stand any Git GUI and was living in terminal.
- brigandish 5y ago> Rant time: You've heard it before, git is powerful, but what good is that power when everything is so damn hard to do? Interactive rebasing requires you to edit a goddamn TODO file in your editor? Are you kidding me? To stage part of a file you need to use a command line program to step through each hunk and if a hunk can't be split down any further but contains code you don't want to stage, you have to edit an arcane patch file by hand? Are you KIDDING me?! Sometimes you get asked to stash your changes when switching branches only to realise that after you switch and unstash that there weren't even any conflicts and it would have been fine to just checkout the branch directly? YOU HAVE GOT TO BE KIDDING ME! > If you're a mere mortal like me and you're tired of hearing how powerful git is when in your daily life it's a powerful pain in your ass, lazygit might be for you. I sympathise, deeply. If you've never found yourself counting lines - repeatedly, because your last attempt failed - while manually editing a hunk, then I envy you.
- sharperguy 5y agoThis is the main reason I use "git gui". When I tell people they tend to have the kneejerk reaction "eww you use a gui with git, learn the command line its more powerful and not that hard". But being able to right-click individual lines of code to stage/unstage them is basically the only thing I use it for, since editing patch files is a pain. The tool is also very lightweight and opens instantly, which would be a reason to switch to something else if it weren't the case.
- typon 5y agoThe main feature missing from any git tool I have used is the Magic Wand that exists in CLion or other IntelliJ tools. I don't understand why that isn't almost a git builtin. Rebasing without magic wand is a massive chore.
- Waterluvian 5y agoCan lazygit help me clean up my branches? Our GitHub is set to delete a branch whenever we squash merge it in a PR. But for the life of me I cannot get my local version to cleanup too. All the stack overflow popular answers that use sed and such fail for some reason.
- comfydragon 5y agogit remote prune origin ?
- toastal 5y agogit trim?
- Waterluvian 5y agoIf you meant this: https://github.com/foriequal0/git-trim https://github.com/foriequal0/git-trim Thank you! Didn't know about it and it solves the problem I'm having.
- manoji 5y agogit-flow has worked well in this regard for me.
- nsonha 5y agoI fail to see the use of tools like this. Either I use the GUI in my editor, vscode which is decent, or vim or emacs, or I don't (need to resolve conflicts) use a separate program and just do it with the git command.
- fouc 5y agoI was hoping for an interactive CLI ui kind of like fdisk menu style.. i.e. commands are visible at all times.
- hendry 5y agoWas hoping lazy git would perhaps help with a feature that tig lacks and I've only found via vim-fugitive. I.e. viewing the whole file between revisions https://s.natalian.org/2021-12-01/git-file.mp4 https://s.natalian.org/2021-12-01/git-file.mp4
- SAI_Peregrinus 5y agoIntelliJ's git view can do this too. You can select a file, view its complete history, and view a diff between any two revisions, as well as see the complete state at any revision. And the commit messages are in a subframe.
- edem 5y agoI've been using this to great effect for a very long tine! I can only recommend it.
- nathias 5y agoits nice but I prefer tig
- themadturk 5y agoI tried Lazygit and didn't like it. But my git needs are pretty simple, since I use it for text, not code, and rarely do more than commit, push and pull (with the occasional branch), so clients built into editors or the CLI are good enough for me.