{"id":524,"date":"2008-02-28T17:55:01","date_gmt":"2008-02-29T01:55:01","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/git-chat\/"},"modified":"2008-02-28T17:55:01","modified_gmt":"2008-02-29T01:55:01","slug":"git-chat","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/git-chat\/","title":{"rendered":"Git Chat"},"content":{"rendered":"<p>Actual IM conversation:<\/p>\n<pre>\r\n[me]: ever use git?\r\n[them]: Why would I do such a thing?\r\n[me]: peer pressure, because all of your co-devs \r\n      told you it was the cool thing to do\r\n<\/pre>\n<p>I thought that developing the software that drives <a href=\"http:\/\/fate.multimedia.cx\/\">FATE<\/a> would serve as a good opportunity to learn the <a href=\"http:\/\/git.or.cz\/\">Git source control software<\/a>. Foolish. <\/p>\n<p>Git terrifies me. Thing is, I make mistakes. <em>Lots<\/em> of mistakes. I need a source control management system (SCM) that is sympathetic to my incompetence. As it stands, when I make a mistake, I have to dig through 140 git-* commands on my system to try to guess which one just might offer a shimmering hope of redemption. If I choose poorly, I will only exacerbate the situation as well as pollute the official history log. Such was the case when I tried to revert one particular commit. I can&#8217;t remember how that worked out exactly. I guess I got the correct code back eventually, but the log file tells a sordid tale.<\/p>\n<p>More recently, I edited a file but decided I didn&#8217;t want the changes; I wanted the previous committed version back. Perhaps use git-revert, like most other SCMs? Goodness, no. Maybe git-reset? Guess again. Turns out git-checkout is what I was looking for (thanks, Mans). Now, I have made the mistake of using git-commit in such a way that actually committed more files than I thought it would (serves me right for following examples and not reading the pedantic documentation first). Now I find myself wanting to undo the commit for one particular file but not actually lose the changes.<\/p>\n<p>Here&#8217;s a solution that can&#8217;t fail: &#8216;rm -rf .git\/&#8217;, followed by a re-reading of how to initialize a local Subversion repository. And whose idea was it to tag revisions with random 160-bit hex codes like 488dfe6a946bbbbb4e095a5d758ad9808f7336b1? (Yeah, I know, they&#8217;re SHA-1 codes or some such. I don&#8217;t care; it&#8217;s still not human-friendly). I hope <a href=\"http:\/\/ffmpeg.org\/\">FFmpeg<\/a> never gets around to making the switch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Actual IM conversation: [me]: ever use git? [them]: Why would I do such a thing? [me]: peer pressure, because all of your co-devs told you it was the cool thing to do I thought that developing the software that drives FATE would serve as a good opportunity to learn the Git source control software. Foolish. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-524","post","type-post","status-publish","format-standard","hentry","category-general"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=524"}],"version-history":[{"count":0,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/524\/revisions"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}