VSCode handles this very well too: select the lines you want to commit and do "Git: Stage selected ranges"
https://github.com/microsoft/vscode/issues/96104
If you staged selected ranges it could change the line endings of the whole file from CRLF to LF. It's very easy to miss since it doesn't show in the normal diff, but then you end up with merge conflicts galore later on.
[alias]
sync = "git squash && git pull --rebase && git pop && git push" # YMMV
Git GUIs are always changing the interface to git. It gives you this weird lockin and islandification. Knowing how to actually use git can give you super powers.