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
MBMark Burton <markb@ordern.com>
Date
Nov 6, 2008, 17:53 UTC
Message-ID
<loom.20081106T174246-381@post.gmane.org>
In-Reply-To
<09C2A669-2B99-4490-9C95-FCCD76C03D61@idibu.com>
Hi Steve,
I think you are making the same mistake as I did when I first started using git.

You can't push to "master" from a remote repository because if you do, the index and working files associated with the receiving repository look as if they have been changed because they are out of date WRT the repository.

If you want to push to a repository that has working files associated with it, push to a remote branch in that repository and then merge the contents of the remote branch into the working files. I.e. don't push to "master", push to "remotes/somename/master" and then merge somename/master into the master branch.

That's what I do now to migrate changes from my satellite development machines to my master machine.

Cheers,
Mark
Previous: Steve WalkerNext: Jeff King
Message 3 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.