• BehindTheBarrier
    link
    fedilink
    arrow-up
    2
    ·
    2 days ago

    Thanks for the replies.

    The stashing isn’t as bad as it sounds, it keeps a copy around when swapping branch so even if you fuck it up, it should still be in storage. I think the worst one I had was popping from the shelf and it failed to apply but still got removed… I don’t remember why that ended up happening but yeah. Not exactly related to the automatic stashing however. But I tend to more often want to keep changes changing branch than not. I have to use stash/Shelve less often because of it.

    I know Jetbrains added a “all in one” diff option about a year ago, but I hate it as large/many files make it horribly slow and awful to navigate compared to just moving through the files one at a time. But the diff view itself good. I know there may be some that disagree, but it allows ignoring whitespace and newlines, which filters out non-important from important changes. For most programming (aka not python) whitespace changes means nothing so it doesn’t matter 99% of the time. But it greatly improves going through a diff that had a total “code cleanup/reformat”. Which is more often than one would expect in my project.

    • AusatKeyboardPremi@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      22 hours ago

      Ignoring whitespace can simplify diffs, but I prefer to keep it visible to see exactly how the code has changed.

      I also try to minimize whitespace changes by relegating formatting adjustments to the final stage of a code check-in, after all approvals. It is even better when the project or team uses Git hooks with a linter and formatter to take away this rote work altogether.

      Thank you too for sharing your workflow. It is always interesting to read how everyone approaches the same problem in their own way. :-)