Git for the lazy programmer
Brendan McDonaldVersion control is something we all use, daily. Even if we're just working solo, using a tool like Git just makes sense.
If you're like me, you learned the basics of Git and then stopped there. You know how to commit, push, and pull. You know how to create branches and merge them. But if you hear someone talk about reflog or rebasing, you start to feel a little nervous.
I always enjoyed using the terminal for Git and never enjoyed any of the GUI tools, though using VSCode's source control tree for staging and committing is pretty nice. But I've always been a little lazy when it comes to Git. I don't want to remember a bunch of commands, and I don't want to have to think too hard about what I'm doing. I just want to get my work done.
When I finally got around to making Neovim my editor of choice, I was looking for a replacement to GitLens, I loved being able to be in a file and see blame line hovers and open the relevant pull requests. I didn't find that replacement, but I did find lazygit.
It was intuitive & it felt like an extension of Vim, even though it is its own TUI. I could navigate with hjkl
and the panel aware hotkeys made sense. I could stage hunks, commit, push, pull, and even resolve merge conflicts all from the terminal. I could even see the diff of a file and stage hunks from there. It was everything I wanted in a Git tool.
I could do everything on the fly and it wrapped the less commonly used commands within the keybinds menu & the flags were secondary prompts; all while showing you the input & output in a separate panel.
I enjoyed it so much, I made a video about it to share with my co-workers and while making that, I discovered one of my favorite commands, o
will take you out of the terminal and automatically start a PR of your current branch. It made me feel truly lazy.
Theres not a ton to really explain, its a Git tool thats great for lazy programmers. It's a TUI, so you can use it in the terminal, and it's open source. I highly recommend it if you're like me and just want to get your work done without having to think too hard about Git.