Git - Temporarily ignore trivial changes to files

前端 未结 4 1331
逝去的感伤
逝去的感伤 2021-01-29 22:22

I\'m looking for a way to \'hide\' minor changes made to a few files in Git, such that they will not show up in git status until a different change is made to those files.

4条回答
  •  面向向阳花
    2021-01-29 23:03

    Just don't add the trivial changes.

    It's good practice to carefully review the things that you add before committing.

    You can even ignore some changes in a file while adding others, using

    git add -p.
    

    This is even easier if you use gitx (R).

提交回复
热议问题