0

How can I reword a commit message that has been pushed using its SHA1 hash?

Assuming that I'm on branch feature/abc and it hasn't been merged into main yet.

But the commit has been pushed to the remote.

M.A Shahbazi
  • 876
  • 9
  • 23
  • https://stackoverflow.com/search?q=%5Bgit%5D+change+commit+message – phd Dec 29 '22 at 08:35
  • I want to reword a commit using its `SHA1`, and I have explicitly mentioned that in the title. The similar question that is attached is not explaining how to do it using `SHA1`. – M.A Shahbazi Dec 29 '22 at 08:40
  • 1
    This answer does: https://stackoverflow.com/a/41987851/7976758 Except `git rebase -i HEAD~n` you can do `git rebase -i SHA1~`, that's the only difference. Then `git push --force` (also in the answers there). – phd Dec 29 '22 at 08:42

0 Answers0