git amend with previous commit 1

git amend with previous commit

git commit --amend -m "an updated commit message"

Here is what the above code is Doing:
1. git commit –amend -m “an updated commit message”
– This command will open up your default text editor, allowing you to edit the commit message.
– If you don’t want to edit the commit message, you can use the -C option to skip the editor and just use the new commit message.
2. git commit –amend –no-edit
– This command will amend the previous commit without changing the commit message.

Similar Posts