in Git by
Q:
Why is it desirable to create an additional commit rather than amending an existing commit?

1 Answer

0 votes
by
There are a couple of reasons for this –

The amend operation destroys the state that was previously saved in a commit. If there is just the commit message being changed then that’s not a problem.  But if the contents are being amended then chances of eliminating something important remains more.

Abusing “git commit- amend” can result in the growth of a small commit and acquire unrelated changes.

Related questions

0 votes
asked Oct 16, 2019 in Git by rajeshsharma
0 votes
asked Oct 15, 2019 in Git by rajeshsharma
...