Change last commit message in GIT and push in GITHUB

Asked

Viewed 59 times

-1

By checking my last push on github I identified a typing error in the commit message, how to change?

  • You can view this information at the link below: https://docs.github.com/pt/committing-changes-to-your-project/changing-a-commit-message

1 answer

0


Changing the last commit in the Git repository... 1-On the command line, navigate to the repository that contains the commit you want to fix.

2-Type git commit --Amend and press Enter.

3-In the text editor, edit the commit message and save the commit.

Sending the changed commit to Github

Now Use the push --force command to push over the old commit. git push --force

Okay... I hope I helped... In the font you will find more details and alternatives ok! Source: https://docs.github.com/pt/github/committing-changes-to-your-project/changing-a-commit-message

Browser other questions tagged

You are not signed in. Login or sign up in order to post.