4 ms·
I was a big fan of a good keyboard-driven git TUI like magit, neogit, lazygit, etc... (as long as you learn the CLI first and understand it). Now I no longer d
by tcoff91 11mo ago
I was a big fan of a good keyboard-driven git TUI like magit, neogit, lazygit, etc... (as long as you learn the CLI first and understand it).
Now I no longer directly use git, but instead use jujutsu (jj).
Once I became very proficient in the jj cli, I picked up jjui: https://github.com/idursun/jjui https://github.com/idursun/jjui
Also, as splitting commits is an extremely frequent operation, this neovim plugin is really nice: https://github.com/julienvincent/hunk.nvim https://github.com/julienvincent/hunk.nvim
Also this neovim plugin is amazing for resolving jj conflicts: https://github.com/rafikdraoui/jj-diffconflicts https://github.com/rafikdraoui/jj-diffconflicts
Now with jj instead of git I edit the commit graph as effortlessly as if I am moving lines of code around a file in my editor.
- dizzant 11mo agoThank you for the many tool links! You seems to know this space well. I have come to pick your brain for more. I have been searching for a while for good tools to split/regroup diffs in a patch series. hunk.nvim looks interesting. Do you know of similar/competing tools? I frequently hit a problem where removing a spurious hunk from an old commit causes cascading conflicts in all subsequent commits. Are there tools to propagate hunk removal into the future without the manual conflict-resolution pain? Thanks again!
- stavros 11mo agoNot the GP, but I might recommend Jujutsu for that, try it and see. It does the right thing when you resolve commits, and it propagates them to git. However, I'm not sure if it'll work, try it and see.
- muti 11mo agoAre you looking for solutions within git or jj? In my experience with jj when resolving a conflict, as long as I do it in the earliest change, I will only have to do it once. Git has the rerere setting [0] which reduces the need to resolve the same conflict over and over 0: https://git-scm.com/book/en/v2/Git-Tools-Rerere https://git-scm.com/book/en/v2/Git-Tools-Rerere
- wredcoll 11mo agoI can't help with your actual problem but I am incredibly curious about how/why you run into this so frequently you need a tool for it. I feel like in my 15 or whatever years of using git I have basically never wanted to remove a hunk from an old commit or anything similar.
- __float 11mo agoI try to leave a good commit trail in my PRs. These are often _not_ the reality of how the code was written and originally committed, but a rough approximation of the intended steps with the benefit of hindsight. A tool like https://github.com/tummychow/git-absorb https://github.com/tummychow/git-absorb has been on my to-try list for a while, but for now I do it by hand.
- greenicon 11mo agogit absorb works surprisingly well. I was quite skeptical in the beginning, but it really turned into something I used daily (until I switched to jj, where I haven't found a replacement yet). If you use stepwise commits I can really recommend it. small edit: It seems that jj supports `jj absorb` now as well. Wonderful!
- icorbrey 11mo agoIndeed, though I don't think it can create fixup commits if that's what you're looking for. However, it might work great for that if you pair it with jj-spr: https://github.com/LucioFranco/jj-spr https://github.com/LucioFranco/jj-spr
- dizzant 11mo agoI am often responsible for landing branches created by colleagues who are less disciplined about their diff cleanliness than me. Very often, attempting to regroup a spurious change from an early commit to a separate "cleanup" commit results in a long conflict hell.
- bombela 11mo agogit rerere https://git-scm.com/book/en/v2/Git-Tools-Rerere https://git-scm.com/book/en/v2/Git-Tools-Rerere
- stavros 11mo agoJujutsu is much better than git, and I've switched to it completely, but I do still use lazygit for one thing: It has better diff viewing, it separates the diffs by file and they look nicer. It's the only thing keeping me on lazygit, as jjui is much better otherwise.
- onraglanroad 11mo agoGit doesn't fundamentally work with diffs (patches). It stores the complete file and generates a diff. So you can use any diff tool you like with git, and I presume also with JJ. Look for the setting. Edit: in git it's the diff.external setting
- stavros 11mo agoI know I can. I want to use jjui, but its UI isn't as good, so I use lazygit.
- SAI_Peregrinus 11mo agoThere's also lazyjj. I haven't really bothered with a TUI yet so can't say which has nicer diffs, but you might try it.
- stavros 11mo agoI've tried lazyjj, but jjui was better (at least, back when I tried it).
- raylu 11mo agoI've thought about using https://github.com/dlvhdr/diffnav https://github.com/dlvhdr/diffnav for that
- stavros 11mo agoThis looks very interesting, thank you!
- moron4hire 11mo agoI think a big problem with Git is that it's not opinionated enough. Every team has their own Git flow because Git makes it possible to do so and most developers love nothing more than micro optimizing every minute aspect of any work that is not the task they've been assigned this sprint (myself included), or avoiding learning anything at all (half of my coworkers) thereby leaving the decisions to people like me. I'd much prefer a tool that has one way to do things and everyone just had to "get with the program." Instead, we have this Swiss Army knife that can do anything but requires arcane knowledge of how to do things that are just slightly off the beaten path. I'm very comfortable with Git and have saved coworkers in just a few minutes from what they thought was going to be missing days of work. But I'd much rather if they had never gotten into that situation or could easily fix it themselves. I don't like the idea of every software team needing a Git expert in easy reach just in case something goes awry.
- wredcoll 11mo agoThis is a good point, git is more like a very clever toolbox than an actual "version control system". You can certainly implement a vcs using git, but it doesn't exactly start out as one.
- jimbokun 11mo agoMakes me wonder what other tools could be implemented on top of git, besides a vcs. I’m sure I’m not the first one to have that thought. So I’m curious what other tools and systems people have built in top of git.
- Aperocky 11mo agoIn the past we would say google it but it's even more inexcusable today with LLMs. And if something becomes really hard to do with git, I found that often the problem are on the project itself.
- duskdozer 11mo agoIf you could make it opinionated in one or two ways, how would you do it? I'm having a hard time thinking about situations that would be solved by this
- socalgal2 11mo agojust to add to the chorus, I'm switching to jj as well. I haven't started using it in every project but it's only a matter of time I think. That said, I do which for a more jj aware GUI. For one, it's nice to be able to quickly see diffs across a bunch of changes. I use gg for this but I'd prefer a side-by-side diff and, ATM it only has a traditional diff. Also, watching the video of git butler, it seems like a jj UI could take a lot of inspiration. I'd love to be able to just drag changes rather than `jj rebase ...` and/or drag selections of lines. I'd also like a nicer GUI for interactive splitting/rebasing than the TUI UI built into jj
- sheremetyev 11mo agoYou can use VisualJJ to rebase via drag & drop, split interactively etc. https://www.visualjj.com https://www.visualjj.com - I'm building it and would appreciate any feedback!
- MrGreenTea 11mo agoalso just to add that I've noticed that `jj` comes way easier and more intuitive to newbies I've mentored. Just yesterday I told a friend to commit his changes and he just wanted to do `git commit` (without remembering to do `git add` first). This made me realize we should just install `jujutsu` for him and he's been committing very diligently afterwards. Can recommend trying this with any people you mentor/teach.
- senekor 11mo agoThat's also my opinion, that jj should be easier for juniors to pick up. However, I felt like there's a lack of learning material targeted at people without prior VCS experience. That's why I wrote "Jujutsu for everyone": https://jj-for-everyone.github.io/ https://jj-for-everyone.github.io/.
- _betty_ 11mo agoooh that's interesting, wonder if that works better than git eorktrees when playing with multiple AI agents
- MaxBarraclough 11mo ago> I was a big fan of a good keyboard-driven git TUI like magit, neogit, lazygit, etc... (as long as you learn the CLI first and understand it). How about tig?