Git commit: Difference between revisions
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
{{Warn|If the latest commit that has been amended was pushed in a remote repository, you will need to overwrite it in the remote repository - thus rewriting history - with | {{Warn|If the latest commit that has been amended was pushed in a remote repository, you will need to overwrite it in the remote repository - thus rewriting history - with | ||
<syntaxhighlight lang='bash'> | |||
git push --force | git push --force | ||
</syntaxhighlight> | |||
}} | }} | ||
Revision as of 02:09, 31 August 2019
External
Internal
Overview
Apply Extra Changes to the Latest Commit
If the latest commit that has been amended was pushed in a remote repository, you will need to overwrite it in the remote repository - thus rewriting history - withgit push --force
Update a Commit Message that Has Not Been Pushed Yet
git commit --amend
It will start an interactive editor.