{"id":21877,"date":"2014-05-29T13:19:18","date_gmt":"2014-05-29T11:19:18","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=21877"},"modified":"2014-05-29T13:19:18","modified_gmt":"2014-05-29T11:19:18","slug":"gitjk-undo-what-you-just-did-in-git","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2014\/05\/29\/gitjk-undo-what-you-just-did-in-git\/","title":{"rendered":"gitjk &#8211; undo what you just did in git"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><a href=\"https:\/\/github.com\/mapmeld\/gitjk\">gitjk<\/a> &#8211; undo what you just did in git.<\/p>\n<p>Supports the following git commands: add, archive, branch, cat-file, checkout, clone, commit, diff, fetch, grep, init, log, ls-tree, merge, mv, pull, push, remote, revert, rm, show, stash,status.<\/p>\n<p>Support for the following git commands is not implemented: bisect, fsck, gc, prune, rebase, reset, tag.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>gitjk &#8211; undo what you just did in git. Supports the following git commands: add, archive, branch, cat-file, checkout, clone, commit, diff, fetch, grep, init, log, ls-tree, merge, mv, pull, push, remote, revert, rm, show, stash,status. Support for the following git commands is not implemented: bisect, fsck, gc, prune, rebase, reset, tag.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"link","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":"","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],"tags":[2265,1588],"keyring_services":[],"class_list":["post-21877","post","type-post","status-publish","format-link","hentry","category-general","category-programming","category-technology","tag-git","tag-version-control","post_format-post-format-link"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":28529,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/04\/27\/git-clean-a-nice-addition-to-git-reset\/","url_meta":{"origin":21877,"position":0},"title":"git clean &#8211; a nice addition to git reset","author":"Leonid Mamchenkov","date":"April 27, 2018","format":false,"excerpt":"Anybody working with git is probably well familiar with the way to undo the non-committed changes: As useful as the above command is, it still leaves some room for improvement. The above command will only undo non-committed changes on the files that git is tracking. Often, this would leave 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":24322,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/06\/09\/git-undo\/","url_meta":{"origin":21877,"position":1},"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":21877,"position":2},"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":25046,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/12\/12\/fixing-mistakes-in-git\/","url_meta":{"origin":21877,"position":3},"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":26280,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/07\/24\/git-from-the-inside-out\/","url_meta":{"origin":21877,"position":4},"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":27310,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/02\/09\/use-vimdiff-as-git-mergetool\/","url_meta":{"origin":21877,"position":5},"title":"Use vimdiff as git mergetool","author":"Leonid Mamchenkov","date":"February 9, 2017","format":false,"excerpt":"Ruslan Osipov has a very handy tutorial on how to setup Vim text editor as git merge tool, for resolving git conflicts. Basically, run the following commands to tell git to use Vim as a merge tool (don't forget the --global flag if you want it for all your projects,\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\/02\/three-way-merge-with-vimdiff-500x259.png?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\/21877","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=21877"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/21877\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=21877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=21877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=21877"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=21877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}