Answers for "git revert a amend and create new commit"

76

git change commit message of old commit

git commit --amend -m "New commit message"
Posted by: Guest on March-11-2020
14

git amend commit message

git checkout branch_name
git commit --amend -m "Modified message"
# if previous commit is not pushed yet
git push
# or if previous comment was pushed in a previous commit:
git push --force-with-lease branch_name
Posted by: Guest on September-14-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language