Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3991146
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:34:48+00:00 2026-05-20T06:34:48+00:00

In my local repo I have one commit with an incorrect commit message. I’ve

  • 0

In my local repo I have one commit with an incorrect commit message.

I’ve already published the incorrect commit message with git push.

Now the remote repo (which is GitHub-hosted) has the incorrect commit message, too.

I’ve already tried git commit --amend, but found that it will not work for me in this situation because I’ve made additional commits since the incorrect one.

How would you fix this situation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:34:49+00:00Added an answer on May 20, 2026 at 6:34 am

    Easiest solution (but please read this whole answer before doing this):

    1. git rebase -i <hash-of-commit-preceding-the-incorrect-one>
    2. In the editor that opens, change pick to reword on the line for the incorrect commit.
    3. Save the file and close the editor.
    4. The editor will open again with the incorrect commit message. Fix it.
    5. Save the file and close the editor.
    6. git push --force to update GitHub.

    This will mean you will be publishing a modified version of a previously published repository. If anyone pulled or fetched from your repo between when you made the mistake with the incorrect commit message, and when you fixed it, then they will experience some difficulties later. So be sure you can accept this consequence before trying this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a a remote git repo and a local clone. Let's say I
I have two resolvers configured. One is the company repo, the other a local
So i have this local SVN repo that i am using for my dev
I created a local Git repo on my laptop and then pushed the source
I am trying to do 'deploy:cold' for my app. The git repo is local
I do: $ git commit . $ git push error: Entry 'file.php' not uptodate.
I'm on a team using Git right now, and we have a pretty good
For example, I have a repo, and one subfolder is empty because the code
I am a power git user and a happy one at that. Now, I'm
I have a Git repository on my local machine that I cloned from my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.