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

Re: error: failed to push some refs

From
TAThomas Anderson <zelnaga@gmail.com>
Date
Mar 7, 2010, 05:04 UTC
Message-ID
<15b345f1003062104p67edcde9pba7cf6000d4d7a2c@mail.gmail.com>
In-Reply-To
<20100307021848.GI2529@spearce.org>
On Sat, Mar 6, 2010 at 8:18 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 30 quoted lines
> Thomas Anderson <zelnaga@gmail.com> wrote:
>> I cloned git://github.com/symfony/symfony.git to C:/git/test-root and
>> then cloned C:/git/test-root twice to C:/git/test-clone and
>> C:/git/test-clone2.  I modify the README file in C:/git/test-clone,
>> stage it, commit it and then try to push it to C:/git/test-root and
>> get this message:
>>
>> To prevent you from losing history, non-fast-forward updates were rejected
>> Merge the remote changes before pushing again.  See the 'non-fast forward'
>> section of 'git push --help' for details.
>> Pushing to C:/git/test-root
>> To C:/git/test-root
>>  ! [rejected]        master -> master (non-fast forward)
>> error: failed to push some refs to 'C:/git/test-root'
>>
>> What does that even mean?
>
> Exactly what the message said to you:
>
>  To prevent you from losing history, non-fast-forward updates were rejected
>  Merge the remote changes before pushing again.  See the 'non-fast forward'
>  section of 'git push --help' for details.
>
> Someone else (your other clone) modified your project in the interim.
> To prevent losing their change, you need to use `git pull` to bring
> in their work, merge it with your own, and then you can push it to
> the destination.
>
> For more details, check the `git push` manpage section suggested
> by the error message above.

How do I do "git pull" with Git Gui? And in any event, if there's a conflict, I wouldn't want to overwrite my code with the code on the server - I'd want to view a diff so that I might resolve the conflict by hand.

Previous: Shawn O. PearceNext: Dmitry Potapov
Message 3 of 4 in “error: failed to push some refs”
  1. Thomas AndersonMar 7, 2010
  2. Shawn O. PearceMar 7, 2010
  3. Thomas AndersonMar 7, 2010
  4. Dmitry PotapovMar 7, 2010

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.