Git provides an option to modify the last commit. For staging follow the normal method:
git add .After staging the files, use the
--amend
option to staged files to the last commit:
git commit --amendIf no commit message is provided with
-m
option the previous commit message will be prompted by default. On the other hand to amend a commit without changing its commit message use the --no-edit
option.
No comments:
Post a Comment