0
How will you fix a Broken Commit?

Open 1 Answers 217 Views Technology

 How will you fix a Broken Commit?

1 Answer

0

 To fix a broken commit or to change the last commit, the most convenient method is to use the command “git commit -amend’.

It allows you to combine staged changes with the previous commit as an alternative for creating an entirely new commit. This replaces the most recent commit with the amended commit.

broken commit

[image source

Through this command, you can also edit the previous commit message without changing its snapshot.

by (301k points)
...