{"id":24504,"date":"2015-07-23T18:36:46","date_gmt":"2015-07-23T16:36:46","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=24504"},"modified":"2015-07-23T18:36:46","modified_gmt":"2015-07-23T16:36:46","slug":"code-sleuthing-with-git","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2015\/07\/23\/code-sleuthing-with-git\/","title":{"rendered":"Code Sleuthing with Git"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><a href=\"https:\/\/robots.thoughtbot.com\/code-sleuthing-with-git\">Code Sleuthing with Git<\/a> has a handy tip for searching through git logs:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n-S &lt;string&gt; \r\nLook for differences that change the number of occurrences of the specified string (i.e. addition\/deletion) in a file.\r\n<\/pre>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Code Sleuthing with Git has a handy tip for searching through git logs: -S &lt;string&gt; Look for differences that change the number of occurrences of the specified string (i.e. addition\/deletion) in a file.<\/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":"Code Sleuthing with Git #WebDev #Programming #git","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,18,62,1334],"tags":[2265,1588,1330],"keyring_services":[],"class_list":["post-24504","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","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":26685,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/09\/12\/git-history-of-a-source-code-line\/","url_meta":{"origin":24504,"position":0},"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":25046,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/12\/12\/fixing-mistakes-in-git\/","url_meta":{"origin":24504,"position":1},"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":24322,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/06\/09\/git-undo\/","url_meta":{"origin":24504,"position":2},"title":"git undo","author":"Leonid Mamchenkov","date":"June 9, 2015","format":false,"excerpt":"The GitHub Blog runs a very handy post:\u00a0How to undo (almost) anything with Git, which covers a variety of git scenarios which you'd want to undo - anything from typos in commit messages to handling of branches. If you don't feel like learning all that, have a look at gitjk\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\/2015\/06\/git-500x117.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":25943,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/03\/15\/useful-git-commands-and-github-integration\/","url_meta":{"origin":24504,"position":3},"title":"Useful git commands (and GitHub integration)","author":"Leonid Mamchenkov","date":"March 15, 2016","format":false,"excerpt":"Garrett Holmstrom's blog \/dev\/zero has a nice collection of useful git commands, especially for those people who work a lot with GitHub. \u00a0Here are a few links to get you started: URL Rewriting Shortcut for GitHub Pull Requests Reverting a range of git commits separately Very handy stuff!","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":28827,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/09\/30\/highlights-from-git-2-19-and-php-syntax\/","url_meta":{"origin":24504,"position":4},"title":"Highlights from Git 2.19 and PHP syntax","author":"Leonid Mamchenkov","date":"September 30, 2018","format":false,"excerpt":"GitHub blog covers the highlights from Git 2.19, which was recently released. One particular change that I want to highlight (which GitHub skipped in their highlights, but which exists in the Git release notes for this version) is the syntax pattern update for the PHP files. Let's have a look\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\/2018\/09\/git-range-diff-500x243.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":23822,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/04\/07\/10-years-of-git-an-interview-with-git-creator-linus-torvalds\/","url_meta":{"origin":24504,"position":5},"title":"10 Years of Git: An Interview with Git Creator Linus Torvalds","author":"Leonid Mamchenkov","date":"April 7, 2015","format":false,"excerpt":"Linux.com reminds us that git is celebrating its 10th birthday this year. \u00a0An interview with git creator Linus Torvalds sheds some light on to how and why it happened, and how long it took. You can actually see how it all took shape in the git source code repository, except\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"AtlassianGit10year","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2015\/04\/AtlassianGit10year-500x295.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24504","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=24504"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24504\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=24504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=24504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=24504"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=24504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}