# Fix commit message after push?

2 messages from 2008-12-27 to 2008-12-27. Participants: skillzero@gmail.com, Miklos Vajna.
Thread: https://gitlist.dev/t/16887

## skillzero@gmail.com, 2008-12-27 21:13

Subject: Fix commit message after push?
Message-ID: <2729632a0812271313l74e9bb85l857a3ad3a3f0d8d8@mail.gmail.com>
URL: https://gitlist.dev/e/2729632a0812271313l74e9bb85l857a3ad3a3f0d8d8%40mail.gmail.com

```
Is there a way to fix a commit message after the commit has already
pushed to someone else? I typed the wrong commit message then I pushed
to the remote repository before realizing it. I tried git commit
--amend to fix it in my local repository, but it rejects the
subsequent push. I somewhat understand why it's rejecting it (my
--amend rewrote history and now they are out-of-sync), but I was
wondering if there is a general way to handle situations like this
with git.

```

## Miklos Vajna, 2008-12-27 21:19

Subject: Re: Fix commit message after push?
Message-ID: <20081227211944.GZ21154@genesis.frugalware.org>
URL: https://gitlist.dev/e/20081227211944.GZ21154%40genesis.frugalware.org
In-Reply-To: <2729632a0812271313l74e9bb85l857a3ad3a3f0d8d8@mail.gmail.com>

```
On Sat, Dec 27, 2008 at 01:13:46PM -0800, skillzero@gmail.com wrote:
> Is there a way to fix a commit message after the commit has already
> pushed to someone else? I typed the wrong commit message then I pushed
> to the remote repository before realizing it. I tried git commit
> --amend to fix it in my local repository, but it rejects the
> subsequent push. I somewhat understand why it's rejecting it (my
> --amend rewrote history and now they are out-of-sync), but I was
> wondering if there is a general way to handle situations like this
> with git.

git push -f

http://git.or.cz/gitwiki/GitFaq#head-c1dc263aca199d347f28872249e6c1f5d519a2df

```
