{"id":28430,"date":"2018-03-12T11:21:22","date_gmt":"2018-03-12T09:21:22","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=28430"},"modified":"2018-03-12T11:21:22","modified_gmt":"2018-03-12T09:21:22","slug":"oh-sht-git","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2018\/03\/12\/oh-sht-git\/","title":{"rendered":"Oh sh*t, git!"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><a href=\"http:\/\/ohshitgit.com\/\">Oh sh*t, git!<\/a> is a collection of git problems, their solutions, and some explanations of how that happened and how to get out of it.<\/p>\n<blockquote><p>Git is hard: screwing up is easy, and figuring out how to fix your mistakes is f*cking impossible. Git documentation has this chicken and egg problem where you can&#8217;t search for how to get yourself out of a mess, unless you\u00a0<em>already know the name of the thing you need to know about<\/em>in order to fix your problem.<\/p><\/blockquote>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Oh sh*t, git! is a collection of git problems, their solutions, and some explanations of how that happened and how to get out of it. Git is hard: screwing up is easy, and figuring out how to fix your mistakes is f*cking impossible. Git documentation has this chicken and egg problem where you can&#8217;t search &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2018\/03\/12\/oh-sht-git\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Oh sh*t, git!<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Oh sh*t, git! #WebDev #git #VersionControl","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,18,133,62,1334],"tags":[2265,1588,1330],"keyring_services":[],"class_list":["post-28430","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-programming","category-sysadmin","category-technology","category-web-work","tag-git","tag-version-control","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":25046,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/12\/12\/fixing-mistakes-in-git\/","url_meta":{"origin":28430,"position":0},"title":"Fixing mistakes in Git","author":"Leonid Mamchenkov","date":"December 12, 2015","format":false,"excerpt":"Linux.com reiterates over the ways to fix and undo mistakes using Git version control software. \u00a0Seasoned git users will probably know all of these already, but since I have to explain these things to git newcomers, I thought I'd have it handy somewhere here.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"git","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2015\/12\/git.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":27732,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/06\/27\/git-add-patch-and-interactive\/","url_meta":{"origin":28430,"position":1},"title":"git add &#8211;patch and &#8211;interactive","author":"Leonid Mamchenkov","date":"June 27, 2017","format":false,"excerpt":"I knew about git interactive staging for a while now, but I've never really used it. \u00a0Most days I work on a single feature or bug fix at a time and can commit sequentially, one change after another. \u00a0For an occasional mess, I found git interactive staging user interface too\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/06\/git-interactive-staging-500x151.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":26280,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/07\/24\/git-from-the-inside-out\/","url_meta":{"origin":28430,"position":2},"title":"Git from the inside out","author":"Leonid Mamchenkov","date":"July 24, 2016","format":false,"excerpt":"Git from the inside out - must be the best thing I've ever seen on how git works. \u00a0Everybody knows that git is awesome. \u00a0Most know that git is implemented with graphs. \u00a0But not many know how exactly git stores the project history and how it is affected by different\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"git","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/07\/git-500x149.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":13012,"url":"https:\/\/mamchenkov.net\/wordpress\/2010\/08\/02\/on-linux-philosophy\/","url_meta":{"origin":28430,"position":3},"title":"On Linux philosophy","author":"Leonid Mamchenkov","date":"August 2, 2010","format":false,"excerpt":"Here is a brilliant passage from an article \"Too Smart for Git\": Git follows Linux's philosophy of refusing to protect you from yourself. Much like Linux, Git will sit back and watch you f*ck your sh*t right up, and then laugh at you as you try to get your world\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26685,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/09\/12\/git-history-of-a-source-code-line\/","url_meta":{"origin":28430,"position":4},"title":"git: history of a source code line","author":"Leonid Mamchenkov","date":"September 12, 2016","format":false,"excerpt":"git is one of those tools that no matter how much you know about it, there is an infinite supply of new things to learn. \u00a0Here's a handy bit I've discovered recently, thanks to this StackOverflow comment: Since Git 1.8.4, git log has -L to view the evolution of a\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":23824,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/04\/07\/git-tips-from-the-trenches\/","url_meta":{"origin":28430,"position":5},"title":"Git tips from the trenches","author":"Leonid Mamchenkov","date":"April 7, 2015","format":"link","excerpt":"Git tips from the trenches\u00a0- doesn't matter how many times I read git tips from around the web, it seems, every time I find something new. \u00a0This time, 'git blame' tips and commit notes were useful.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=28430"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28430\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=28430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=28430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=28430"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=28430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}