Last active
April 20, 2021 14:03
-
-
Save kerembaydogan/438018a679856bbda4cac52db6908f2f to your computer and use it in GitHub Desktop.
Change Commit Message Of Most Recent Commit (Already Pushed)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#If it is the most recent commit, you can simply do this in 2 steps: | |
git commit --amend -m "modified commit message" (amend message) | |
git push --progress origin --force (force push) | |
# Be careful using --force or -f! Bad things might happen... | |
# Force pushing is strongly discouraged since this changes the history of your repository. | |
# If you force push, people who have already cloned your repository will have to manually fix their local history. | |
# You can force push to a branch | |
# If you're absolutely sure that nobody else checked out the amended commit before your push. | |
# https://stackoverflow.com/questions/14381044/how-do-i-change-a-git-commit-message-in-bitbucket | |
# answered Mar 26 '18 at 0:29 naXa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment