Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
Is there a way to avoid superfluous space changes in git history?

If one has made a minor mistake to formatting, say indenting a line that does not need to be indented, is there a way to not have this in the commit history.

For example using git diff I can see ...

-  const getUniqueUserID = require('./websocket-user-id');
+const getUniqueUserID = require('./websocket-user-id');

which might be annoying to see in the commit history. Is this indeed just a change of 2 spaces, the formatting is hard to read.

Should I just commit this space fix with another more substantial fix?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Are you concerned about there being an extra commit, or are you concerned with the diff being less useful?

You can use -b and -w (--ignore-space-change and --ignore-all-space) to minimize the diff, but a commit is a commit and if it's a part of the history it would be more confusing to hide it.

I tend to think it's not a big deal to make a small well-described change, even if it's whitespace-only.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!