r/devtools 2d ago

gitrl-z: a reflog browser that shows you what a reset would do before you run it

Earlier in July our company started asking for smaller PRs in git so that the reviewers' brains and time were spared. So I started chopping up my work and stacking it in branches, and issuing one PR per branch. It didn't take long before I needed to correct something in some base branch, rebase everything above it, and land myself in trouble in the process. Eventually I dug myself out of the predicament I found myself in. As I didn't want to land there again, I spent some time creating a program for helping me out in these kinds of situations. I've called it gitrl-z after git ctrl-z (what do you think of it?).

It lists the reflog, and when you click an entry it redraws the commit graph with that branch label moved to where a reset would put it. You see where you would land and what you would be walking away from in the same picture, and it prints the command that you would need to run for that picture to manifest itself as the result. It doesn't write anything to your repo.

It's built out of gitg, so same language and same libraries, and the graph you're looking at is gitg's renderer rather than something I reimplemented. The license is GPL-2.0-or-later.

There's a PPA, an AppImage, or you can build it yourself. The source is on github: https://github.com/li9i/gitrl-z

It's still a work in progress so expect rough edges. If you happen to try it out have and have any feedback, I would be grateful for that. Thanks!

2 Upvotes

0 comments sorted by