What is "AMEND" in Git?
◩ After committing changes, suppose if you want to change the commit message or commit with new files, then the "amend" flag is used with the git commit command.
◩ Or, if you want to wrap all things under a commit.
◩ Or, if you made mistakes in the commit message that you want to correct.
◩ Or, after making a "commit" you realized that I forgot to include other files.
◩ These are some reasons to use the "amend" flag with the git commit command.
How to "REDO" the previous commit?
◩ Just you have to run this command and include and change your previous commit message.
◩ But before running this command you have to include other files and then run this command.
◩ And if you want to change only the message of commit then you can run it immediately.
$ 𝗴𝗶𝘁 𝗰𝗼𝗺𝗺𝗶𝘁 --𝗮𝗺𝗲𝗻𝗱
After committing "SHA" id will be changed?
◩ Yes, after amending the commit SHA key will be changed every time.
◩ Or in other words, after amending the commit SHA key will be changed.
That's all for now, we will meet in the next article😍
Follow me on: