4 ms·
Git CLI user here. I started out using Sourcetree about 10 years ago and have slowly moved everything into the terminal after also using many other GUIs. `git a
by sixstringtheory 5y ago
Git CLI user here. I started out using Sourcetree about 10 years ago and have slowly moved everything into the terminal after also using many other GUIs. `git add -p` was the last thing to move to terminal because it can be hard to stage individual lines in hunks that can’t be automatically split.
But after I picked up emacs again and started using magit even that became a breeze.
Also, for reviewing changes, I use the no context option `git diff -U0`and more recently use git-delta for better color highlighting and the side-by-side diff view.
I also think in addition to just having learned and practiced over a decade, the way I’ve used Git has evolved too. I keep PRs small and cohesive, always squash all their commits, and because of that I don’t have to care so much about untangling cohesive changes at commit time, although I also don’t let them pile up. I usually do a lot of `git commit --amend` and `git commit --fixup` (more and more rarely actually followed by a `git rebase --autosquash` since the PR takes care of the squash now… I don’t even have to worry about order-based conflicts anymore).
- austinjp 5y agoI didn't know about git delta, thanks for this. Presumably your referring to https://github.com/dandavison/delta https://github.com/dandavison/delta ? Does anyone have any tips for integrating it into an emacs workflow? I'm currently doing `git commit` from shell which launches emacs-nox with magit.
- spartanatreyu 5y agoHmm, I haven't heard of delta before. I've been using diff-so-fancy for a while ( https://github.com/so-fancy/diff-so-fancy https://github.com/so-fancy/diff-so-fancy), but I might have to give delta a try. Edit: It looks like this page shows the comparison between delta and diff-so-fancy: https://dandavison.github.io/delta/features.html https://dandavison.github.io/delta/features.html