Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

133
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda