News for hackers. Stuff that matters.
Re:Git undo: We can do better by dec0dedab0de on Monday June 21, 2021 @12:01PM (#27580459)
I use the Pycharm/Jetbrains Git GUI. At this point I can't imagine effectively handling merge conflicts any other way.

EDIT: Also, I really like being able to look at a diff of every file before I commit, and easily choosing which files to include in a commit. Too often I see people on the CLI accidentally committing changes they didn't mean to, because there is no easy way to check everything at the last minute.

Re:Git undo: We can do better by tcoff91 on Monday June 21, 2021 @12:04PM (#27580492)
even if you use the git CLI you can still set up a mergetool so that when you are resolving merge conflicts you can use something like BeyondCompare or P4Merge to handle the merge conflicts.
Re:Git undo: We can do better by Hamuko on Monday June 21, 2021 @12:08PM (#27580560)
And every Xcode installation on macOS comes with FileMerge.app.
Re:Git undo: We can do better by mixmastamyk on Monday June 21, 2021 @01:36PM (#27581496)
Meld
Re:Git undo: We can do better by fiddlerwoaroof on Monday June 21, 2021 @12:29PM (#27580767)
There’s a really easy way to check the diff before committing on the command-line:

    git commit -v
Displays a diff at the bottom of the editor that pops up to write a commit message.
Re:Git undo: We can do better by cerved on Tuesday June 22, 2021 @03:40AM (#27589008)
you can also set

  git config commit.verbose true
to always have this behavior
Re:Git undo: We can do better by Ashanmaril on Monday June 21, 2021 @01:40PM (#27581537)
The Jetbrains IDE git GUI is by far the best git GUI I've used, I feel lost trying to use git without it.

There's a user request that's been sitting around for a while to pull it out into a dedicated application, which I could personally get behind since we have one project at work that's pretty difficult to run outside of Eclipse

https://youtrack.jetbrains.com/issue/IDEA-152437

Re:Git undo: We can do better by tailspin2019 on Monday June 21, 2021 @05:35PM (#27584831)
Yes Jetbrains have totally nailed this. I have tended to prefer the command line for git but the exceptionally designed GUI support in Rider is fast changing that - especially for rebasing.
Re:Git undo: We can do better by stevenhuang on Monday June 21, 2021 @02:28PM (#27582152)
What's wrong with 'git diff'?

Then there's 'git add -i' to easily choose which files to add

Re:Git undo: We can do better by dividedbyzero on Tuesday June 22, 2021 @07:00AM (#27590138)
> What's wrong with 'git diff'?

Not GP, but I find it extremely hard to parse visually even after having had to do it a lot. Something like git-delta makes it bearable, but a decent syntax-highlighted, color-coded, side-by-side diff view with proper keyboard navigation (next diff, next file) is a huge quality of life boost for me.

> Then there's 'git add -i' to easily choose which files to add

Didn't know that, just tried it, and, wow, that's easily the most unintuitive and inscrutable TUI since vi. I haven't been able to make it show a simple diff; someone else also tried, failed as well.

Re:Git undo: We can do better by cerved on Tuesday June 22, 2021 @03:38AM (#27588999)
it's very easy from the CLI. Much easier than from GUIs actually

  git diff
  git diff --staged
  git restore --staged --partial
  git commit
you can also add commit hooks to reject changes like conflict markers