====== Modify a commit which has been pushed ======
{{template>meta:template:pageinfo#tpl
|desc=Introduce how to modify a commit which has been pushed.}}
===== Steps =====
* Find the ID (denoted by ''pre-cmt-id'') of the previous commit of the commit that you need to modify.
* Run git rebase -i pre-cmt-id.
* Modify ''pick'' to ''edit'' in the line where the commit to be modified is located. Then save and exit.
* Make changes.
* Run git add ....
* Run git commit %%--%%amend.
* Run git push ... if you want to push changes to remote.
* Run git rebase %%--%%continue.
===== Demo Video =====
{{:tools:git:video:git-modify-pre-commit.mp4}}