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

Re: Issue updating files during a checkout from a remote push

From
Jeff King <peff@peff.net>
Date
Nov 7, 2008, 21:59 UTC
Message-ID
<20081107215913.GB20126@coredump.intra.peff.net>
In-Reply-To
<09C2A669-2B99-4490-9C95-FCCD76C03D61@idibu.com>
On Thu, Nov 06, 2008 at 06:17:54PM +0100, Steve Walker wrote:
> Sorry to keep answering my own questions directly after posting...
>
> I just tried with a 'git commit -f' and the files updated.
There is no "-f" option to commit. Did you mean "checkout -f"?

If that is the case, then yes, that will "fix" your problem in that it brings the HEAD, index, and working tree into sync. But it is dangerous in that it throws away any local changes you might have had.

If you did really mean "commit" then that is also a bad solution. It creates a new commit on top of the recently pushed work that reverts all of the changes made by the recently pushed work.

-Peff
Previous: Mark BurtonNext: Andreas Ericsson
Message 4 of 6 in “Issue updating files during a checkout from a remote push”
  1. Steve WalkerNov 6, 2008
  2. Steve WalkerNov 6, 2008
  3. Mark BurtonNov 6, 2008
  4. Jeff KingNov 7, 2008
  5. Andreas EricssonNov 7, 2008
  6. Jeff KingNov 7, 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.