{"thread":{"id":"38067","subject":"Unable to Revert Commit","startedAt":"2014-11-27T16:35:57Z","lastAt":"2014-11-28T14:31:31Z","messageCount":3,"participants":["Rex Macey","Brandon McCaig","Philip Oakley"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"252643","messageId":"547752ED.8010208@macey.us","threadId":"38067","inReplyTo":null,"subject":"Unable to Revert Commit","fromName":"Rex Macey","fromEmail":"rex@macey.us","sentAt":"2014-11-27T16:35:57Z","receivedAt":"2014-11-27T16:35:57Z","isPatch":false,"sender":{"key":"rex@macey.us","avatar":null},"body":"\"Unable to Revert Commit ... Resolve the conflicts in your working \ndirectory and commit them before trying the revert again\".  Please help \nme understand how to resolve the conflicts.  Here's what happened (as \nbest as I remember).\nCreated a windows folder \"github_learn\" (not under my \\documents\\github  \nfolder) ;\nCreated a file file1.r.\nDragged folder into Github for Windows.  Committed; I could see the file \nin my directory, Github for Windows, and on the server (github.com);\nI modified the first file.  Checked that there were different versions \nand then committed it.;\nI created a second file, file2.r Committed it.  All good.;\nThen I tested whether I could retrieve the first version of file1.r \n(before modification).  In the History area of Github for Windows, I can \nsee this version.  I click on that, and then I click on \"Revert\" which \nproduces the error.\n\nI am very new to Git and have read some of the documentation and this \nexercise is my attempt to test myself.  So far my grade is not good.  I \nappreciate any guidance including links to instructions.\nThank you.\nRex Macey\n"},{"id":"252659","messageId":"20141128133709.GA28178@test-chamber-1.castopulence.org","threadId":"38067","inReplyTo":"547752ED.8010208@macey.us","subject":"Re: Unable to Revert Commit","fromName":"Brandon McCaig","fromEmail":"bamccaig@gmail.com","sentAt":"2014-11-28T13:37:10Z","receivedAt":"2014-11-28T13:37:10Z","isPatch":false,"sender":{"key":"bamccaig@gmail.com","avatar":"https://gravatar.com/avatar/05b01f2b62a5ddbaa1946579266a8d9e970fed0c0b3c20e8d42aca973c31531c?d=mp&s=160"},"body":"Rex:\n\nOn Thu, Nov 27, 2014 at 11:35:57AM -0500, Rex Macey wrote:\n> \"Unable to Revert Commit ... Resolve the conflicts in your working\n> directory and commit them before trying the revert again\".  Please\n> help me understand how to resolve the conflicts.  Here's what\n> happened (as best as I remember).\n> Created a windows folder \"github_learn\" (not under my\n> \\documents\\github  folder) ;\n> Created a file file1.r.\n> Dragged folder into Github for Windows.  Committed; I could see the\n> file in my directory, Github for Windows, and on the server\n> (github.com);\n> I modified the first file.  Checked that there were different\n> versions and then committed it.;\n> I created a second file, file2.r Committed it.  All good.;\n> Then I tested whether I could retrieve the first version of file1.r\n> (before modification).  In the History area of Github for Windows, I\n> can see this version.  I click on that, and then I click on \"Revert\"\n> which produces the error.\n> \n> I am very new to Git and have read some of the documentation and\n> this exercise is my attempt to test myself.  So far my grade is not\n> good.  I appreciate any guidance including links to instructions.\n\n\"GitHub\" and \"GitHub for Windows\" are not \"Git\". I don't think\nyou will find official support for those proprietary products on\nthis mailing list (I may be wrong). It looks like you can request\nsupport for those products from the \"contact\" page on the GitHub\nWeb site: https://github.com/contact.\n\nMy personal recommendation would be to get rid of those anyway\nand learn to use the real Git. It's not very difficult, and it is\nlikely to do things better in the long run. As a general rule,\nGUI programs are limited, clumsy, and try too hard to hide the\ndetails of what they are doing from you that you need to\nunderstand to effectively use the software. Do not fear the\ncommand line. It is just like writing code. If you are interested\nin Git then you are probably interested in code. Think of the\ncommand line interface as a more direct interface to tell the\ncomputer what you want with high-level code instead of expensive\ngraphics and event loops and spaghetti code.\n\nI can tell you that git-revert(1) basically means \"create new\ncommits that undo the changes introduced by the specified\ncommits.\" That is likely accomplished by applying a reversed\npatch, and that is likely to fail if the tree (files) has changed\nmuch.\n\nConflicts are OK! They are normal when you work with version\ncontrol software. You can manually resolve the conflicts and\ncontinue with the revert. Google can help you to understand how\nto resolve conflicts. You can do so manually (my preference, and\na good thing to learn to help you understand why conflicts\noccurred in the first place) or you can use software tools to\nhelp. I recommend you create backups of your repository (.git)\nand working tree (...folder where your files are) using something\nlike 7-zip (but a simple copy suffices) when you're new to Git so\nthat if you make a wrong move it's easier to go back and try\nagain with confidence.\n\nThat said, if you just want to *see* the state of the file at a\nparticular point in history you can use git-cat-file(1). Another\nway would be (with a clean tree) git-checkout(1), though that\nwill make changes to your tree (and if you aren't careful can\ndestroy changes that you have already made) that you may not\nwant. The file can be restored to the \"latest\" committed version\nusing git-checkout(1) again (or git-reset(1) with the --hard\noption). Both of these options need to be used with care. In this\ncase, git-reset(1) could also be used to reset the state of your\nworking tree to a clean state if you do decide that git-revert(1)\nisn't what you wanted.\n\nI recommend that you just find a plain Git tutorial and learn to\nthe use the real thing. It's really not that hard. And \"Git for\nWindows\" works well without the need for GitHub's own\nproprietary, platform-specific solution. It even includes a Git\nGUI if you're still reluctant to use the command line (but my\nabove wisdom regarding GUIs probably still applies).\n\nIf you use the real Git then not only can we help you, but you\ncan get real-time advice and guidance from the #git channel on\nirc.freenode.net.\n\nRegards,\n\n\n-- \nBrandon McCaig <bamccaig@gmail.com> <bamccaig@castopulence.org>\nCastopulence Software <https://www.castopulence.org/>\nBlog <http://www.bamccaig.com/>\nperl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.\nq{Vg qbrfa'\\''g nyjnlf fbhaq gung jnl.};\ntr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'\n\n"},{"id":"252661","messageId":"3CDBFA67BE744B97B9C40FB3F3115A7D@PhilipOakley","threadId":"38067","inReplyTo":"547752ED.8010208@macey.us","subject":"Re: Unable to Revert Commit","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2014-11-28T14:31:31Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Rex Macey\" <rex@macey.us>\n> \"Unable to Revert Commit ... Resolve the conflicts in your working \n> directory and commit them before trying the revert again\".  Please \n> help me understand how to resolve the conflicts.  Here's what happened \n> (as best as I remember).\n> Created a windows folder \"github_learn\" (not under my \n> \\documents\\github  folder) ;\n> Created a file file1.r.\n> Dragged folder into Github for Windows.  Committed; I could see the \n> file in my directory, Github for Windows, and on the server \n> (github.com);\n> I modified the first file.  Checked that there were different versions \n> and then committed it.;\n> I created a second file, file2.r Committed it.  All good.;\n> Then I tested whether I could retrieve the first version of file1.r \n> (before modification).  In the History area of Github for Windows, I \n> can see this version.  I click on that, and then I click on \"Revert\" \n> which produces the error.\n>\n> I am very new to Git and have read some of the documentation and this \n> exercise is my attempt to test myself.  So far my grade is not good. \n> I appreciate any guidance including links to instructions.\n> Thank you.\n> Rex Macey\n> --\n\nI belive that what is trying to be said is:\n\n \"You have a 'dirty' worktree which currently contains un-resolved \nconflicts. It would be unwise to attempt a revert, which may further \nconflict with those conflict markers. The easy way out is to resolve \nthose conflict markers first.\"\n\nI'd agree that for the beginner, the compactness of the error messages \ncan be a be difficult to understand.\n\n--\n\nPhilip \n"}]}