“I don't want a whitespace change to replace the whole line, and commenting a line shouldn't count as a rewrite either — so I can track the code that actually stayed the same.”
a line into comments wouldn't replace the whole line either. This way I could be able to keep track of code that remains the same for a longer period of time. Dude, if you comment out a line, the functionality of your code changed. You need to understand that. I can see your point on whitespace, and you can 1) configure git to use Beyond Compare as its diff tool and 2) configure Beyond Compare to ignore whitespace changes. Quite how this fits in with "keep track of code that remains the same for a longer period of time" is questionable. Do you pull two branches form different time lines and di
Just for giggles, I fed ChatGPT your question and asked if there was any way to do it with git. Here's what it said ... What Git already supports Ignore whitespace changes in diffs Git can suppress whitespace-only changes during comparison: git diff -w git blame -w or: git diff --ignore-space-change This helps review history without noise. Ignore formatting commits in blame A common modern workflow: Run a formatter (black, prettier, clang-format) Put that commit hash into: .git-blame-ignore-revs Then: git config blame.ignoreRevsFile .git-blame-ignore-revs Now git blame skips formatting-only co
社区原声 · 热门评论
打开原帖核对