git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Pushing an --amend-ed commit

From
MPMatt Pearson <404emailnotfound@gmail.com>
Date
Jun 3, 2008, 00:08 UTC
Message-ID
<706b4240806021708u4ade0f9ake53e26f53e34d97d@mail.gmail.com>
In-Reply-To
<6B355924-0EA9-4AF8-B051-F17FC4530495@manchester.ac.uk>
On Mon, Jun 2, 2008 at 5:51 AM, Robert Haines <rhaines@manchester.ac.uk> wrote:
> So, is it safe to "use the --force" in this instance when pushing? This
> should just replace the old commit with the --amended commit with no
> side-effects, shouldn't it?

Safe from what perspective? If you're sure nobody has pulled from you, then yes, it's fine. If you know exactly who pulled and can contact them to do a reset and re-pull, then it should be fine. If you don't care about screwing up people who pulled from you, then I suppose that's still fine. However, screwing with history is generally a bad idea, since now people who pull from you don't have your current HEAD as a parent commit in their tree. Finding common ancestors is going to be messed up (and future merges with them, possibly).

(also, first git mailing list post. I hope none of the experienced people have to correct me)

Previous: Robert HainesNext: Matt Pearson
Message 4 of 5 in “Pushing an --amend-ed commit”
  1. Robert HainesJun 2, 2008
  2. Paolo BonziniJun 2, 2008
  3. Robert HainesJun 3, 2008
  4. Matt PearsonJun 3, 2008
  5. Matt PearsonJun 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.