{"thread":{"id":"22930","subject":"Re: error: failed to push some refs","startedAt":"2010-03-07T02:15:47Z","lastAt":"2010-03-07T09:43:20Z","messageCount":4,"participants":["Dmitry Potapov","Thomas Anderson","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"136256","messageId":"15b345f1003061815y52a4e842u9373731cecd8ec60@mail.gmail.com","threadId":"22930","inReplyTo":null,"subject":"error: failed to push some refs","fromName":"Thomas Anderson","fromEmail":"zelnaga@gmail.com","sentAt":"2010-03-07T02:15:47Z","receivedAt":"2010-03-07T02:15:47Z","isPatch":false,"sender":{"key":"zelnaga@gmail.com","avatar":null},"body":"I cloned git://github.com/symfony/symfony.git to C:/git/test-root and\nthen cloned C:/git/test-root twice to C:/git/test-clone and\nC:/git/test-clone2.  I modify the README file in C:/git/test-clone,\nstage it, commit it and then try to push it to C:/git/test-root and\nget this message:\n\nTo prevent you from losing history, non-fast-forward updates were rejected\nMerge the remote changes before pushing again.  See the 'non-fast forward'\nsection of 'git push --help' for details.\nPushing to C:/git/test-root\nTo C:/git/test-root\n ! [rejected]        master -> master (non-fast forward)\nerror: failed to push some refs to 'C:/git/test-root'\n\nWhat does that even mean?\n"},{"id":"136257","messageId":"20100307021848.GI2529@spearce.org","threadId":"22930","inReplyTo":"15b345f1003061815y52a4e842u9373731cecd8ec60@mail.gmail.com","subject":"Re: error: failed to push some refs","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-03-07T02:18:49Z","receivedAt":"2010-03-07T02:18:49Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Thomas Anderson <zelnaga@gmail.com> wrote:\n> I cloned git://github.com/symfony/symfony.git to C:/git/test-root and\n> then cloned C:/git/test-root twice to C:/git/test-clone and\n> C:/git/test-clone2.  I modify the README file in C:/git/test-clone,\n> stage it, commit it and then try to push it to C:/git/test-root and\n> get this message:\n> \n> To prevent you from losing history, non-fast-forward updates were rejected\n> Merge the remote changes before pushing again.  See the 'non-fast forward'\n> section of 'git push --help' for details.\n> Pushing to C:/git/test-root\n> To C:/git/test-root\n>  ! [rejected]        master -> master (non-fast forward)\n> error: failed to push some refs to 'C:/git/test-root'\n> \n> What does that even mean?\n\nExactly what the message said to you:\n\n  To prevent you from losing history, non-fast-forward updates were rejected\n  Merge the remote changes before pushing again.  See the 'non-fast forward'\n  section of 'git push --help' for details.\n\nSomeone else (your other clone) modified your project in the interim.\nTo prevent losing their change, you need to use `git pull` to bring\nin their work, merge it with your own, and then you can push it to\nthe destination.\n\nFor more details, check the `git push` manpage section suggested\nby the error message above.\n\n-- \nShawn.\n"},{"id":"136287","messageId":"15b345f1003062104p67edcde9pba7cf6000d4d7a2c@mail.gmail.com","threadId":"22930","inReplyTo":"20100307021848.GI2529@spearce.org","subject":"Re: error: failed to push some refs","fromName":"Thomas Anderson","fromEmail":"zelnaga@gmail.com","sentAt":"2010-03-07T05:04:03Z","receivedAt":"2010-03-07T05:04:03Z","isPatch":false,"sender":{"key":"zelnaga@gmail.com","avatar":null},"body":"On Sat, Mar 6, 2010 at 8:18 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n> Thomas Anderson <zelnaga@gmail.com> wrote:\n>> I cloned git://github.com/symfony/symfony.git to C:/git/test-root and\n>> then cloned C:/git/test-root twice to C:/git/test-clone and\n>> C:/git/test-clone2.  I modify the README file in C:/git/test-clone,\n>> stage it, commit it and then try to push it to C:/git/test-root and\n>> get this message:\n>>\n>> To prevent you from losing history, non-fast-forward updates were rejected\n>> Merge the remote changes before pushing again.  See the 'non-fast forward'\n>> section of 'git push --help' for details.\n>> Pushing to C:/git/test-root\n>> To C:/git/test-root\n>>  ! [rejected]        master -> master (non-fast forward)\n>> error: failed to push some refs to 'C:/git/test-root'\n>>\n>> What does that even mean?\n>\n> Exactly what the message said to you:\n>\n>  To prevent you from losing history, non-fast-forward updates were rejected\n>  Merge the remote changes before pushing again.  See the 'non-fast forward'\n>  section of 'git push --help' for details.\n>\n> Someone else (your other clone) modified your project in the interim.\n> To prevent losing their change, you need to use `git pull` to bring\n> in their work, merge it with your own, and then you can push it to\n> the destination.\n>\n> For more details, check the `git push` manpage section suggested\n> by the error message above.\n\nHow do I do \"git pull\" with Git Gui?  And in any event, if there's a\nconflict, I wouldn't want to overwrite my code with the code on the\nserver - I'd want to view a diff so that I might resolve the conflict\nby hand.\n"},{"id":"136243","messageId":"20100307094320.GD31105@dpotapov.dyndns.org","threadId":"22930","inReplyTo":"15b345f1003062104p67edcde9pba7cf6000d4d7a2c@mail.gmail.com","subject":"Re: error: failed to push some refs","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2010-03-07T09:43:20Z","receivedAt":"2010-03-07T09:43:20Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Sat, Mar 06, 2010 at 11:04:03PM -0600, Thomas Anderson wrote:\n> \n> How do I do \"git pull\" with Git Gui?\n\nI don't know much about Git Gui, but \"git pull\" is an equivalent of\n\"git fetch\" and \"git merge\", and it seems Git Gui got both Fetch\nand Merge in its menu...\n\n> And in any event, if there's a\n> conflict, I wouldn't want to overwrite my code with the code on the\n> server - I'd want to view a diff so that I might resolve the conflict\n> by hand.\n\n\"git pull\" (or \"git merge\") will produce this conflict in your working\ntree, which you should resolve then and commit. (Git automatically\ncreates a merge commit if there was no conflicts.)\n\n\nDmitry\n"}]}