如何使用 Git 处理工作树中的细微变化?

How does one deal with trivial changes in a working tree using Git?

我经常发现自己在临时区域中有一两个未提交的更改。有时,这些更改不保证提交。通常,这是因为所做的更改只是对注释的修改或临时注释掉代码。

I have a WPF app that has exceptions caught at the top level using an event subscription. I have commented out the line subscribing to the event so that I can have proper debug info for all exceptions thrown.

如何使 git 将我的更改视为已经提交,而不必仅为更改创建提交?

不要。 VCS 的全部要点是 NOT 忽略任何更改。从来没有,无一例外。

相反,在提交 'real' 之前,根据需要重置仅本地文件更改。