{"id":366,"date":"2015-06-10T19:30:23","date_gmt":"2015-06-10T19:30:23","guid":{"rendered":"http:\/\/aurelio.audero.it\/blog\/?p=366"},"modified":"2016-06-04T00:23:58","modified_gmt":"2016-06-04T00:23:58","slug":"trick-of-the-day-undoing-mistakes-in-git","status":"publish","type":"post","link":"https:\/\/www.audero.it\/blog\/2015\/06\/10\/trick-of-the-day-undoing-mistakes-in-git\/","title":{"rendered":"Trick of the day: Undoing mistakes in Git"},"content":{"rendered":"<p>Everyone can make a mistake and <a href=\"https:\/\/git-scm.com\/\">Git<\/a> is probably one of the easiest technologies ever where mistakes happen. Sometimes you or other developers commit things that weren&#8217;t supposed to be committed or even push them on the remote repository. Usually, once something is pushed you don&#8217;t want to mess up with the commit history, but under some circumstances this is totally acceptable. When this happens, you might need a guide to know exactly what to do.<br \/>\n<!--more--><br \/>\nThis article will teach you how to undo and fix many common mistakes when working with Git:<\/p>\n<p><a href=\"https:\/\/github.com\/blog\/2019-how-to-undo-almost-anything-with-git\">https:\/\/github.com\/blog\/2019-how-to-undo-almost-anything-with-git<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Everyone can make a mistake and <a href=\"https:\/\/git-scm.com\/\">Git<\/a> is probably one of the easiest technologies ever where mistakes happen. Sometimes you or other developers commit things that weren&#8217;t supposed to be committed or even push them on the remote repository. Usually, once something is pushed you don&#8217;t want to mess up with the commit history, but under some circumstances this is totally acceptable. When this happens, you might need a guide to know exactly what to do.<\/p>\n","protected":false},"author":1,"featured_media":374,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[33],"tags":[34],"class_list":["post-366","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-trick-of-the-day","tag-git"],"jetpack_featured_media_url":"https:\/\/www.audero.it\/blog\/wp-content\/uploads\/2015\/06\/git-logo.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9Or4e-5U","jetpack-related-posts":[{"id":287,"url":"https:\/\/www.audero.it\/blog\/2014\/04\/14\/learn-how-to-write-an-email-seriously\/","url_meta":{"origin":366,"position":0},"title":"Learn how to Write an Email. Seriously.","author":"Aurelio De Rosa","date":"April 14, 2014","format":false,"excerpt":"As a freelancer I receive a lot of emails every day. In addition to the usual ones (newsletters, friends, and so on), I receive emails from recruiters that want to find me a job, from people that want to hire me for a project, from people that want me to\u2026","rel":"","context":"In &quot;Discussions &amp; Opinions&quot;","block_context":{"text":"Discussions &amp; Opinions","link":"https:\/\/www.audero.it\/blog\/category\/discussions-opinions\/"},"img":{"alt_text":"wrong email","src":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/04\/wrong-email.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/04\/wrong-email.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/04\/wrong-email.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":360,"url":"https:\/\/www.audero.it\/blog\/2015\/05\/27\/job-offers-errors-and-how-to-avoid-them\/","url_meta":{"origin":366,"position":1},"title":"Job Offers Errors and How to Avoid Them","author":"Aurelio De Rosa","date":"May 27, 2015","format":false,"excerpt":"As we all know, IT is a growing field and it's easy to find a job (at least compared to other fields). We're overwhelmed by job offers and recruiters emails sent to find the right person for their clients. Unfortunately, many of these offers are written by people without any\u2026","rel":"","context":"In &quot;Discussions &amp; Opinions&quot;","block_context":{"text":"Discussions &amp; Opinions","link":"https:\/\/www.audero.it\/blog\/category\/discussions-opinions\/"},"img":{"alt_text":"job offer","src":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/05\/job-offer.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/05\/job-offer.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/05\/job-offer.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/05\/job-offer.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/05\/job-offer.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":329,"url":"https:\/\/www.audero.it\/blog\/2014\/09\/19\/resources-beginner-front-end-developers\/","url_meta":{"origin":366,"position":2},"title":"Resources for Beginner Front-end Developers","author":"Aurelio De Rosa","date":"September 19, 2014","format":false,"excerpt":"Few weeks ago I received an email from a developer asking me for suggestions on how to delve into the front-end world. After having replied to this email, I thought that it'd have been nice to share the same suggestions on my blog. That's exactly what you'll find in this\u2026","rel":"","context":"In &quot;Discussions &amp; Opinions&quot;","block_context":{"text":"Discussions &amp; Opinions","link":"https:\/\/www.audero.it\/blog\/category\/discussions-opinions\/"},"img":{"alt_text":"html5 css3 javascript logos","src":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/09\/front-end-stack.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/09\/front-end-stack.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/09\/front-end-stack.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/09\/front-end-stack.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/09\/front-end-stack.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":273,"url":"https:\/\/www.audero.it\/blog\/2014\/02\/05\/why-people-think-php-sucks\/","url_meta":{"origin":366,"position":3},"title":"Why People Think PHP Sucks!","author":"Aurelio De Rosa","date":"February 5, 2014","format":false,"excerpt":"A long time has been passed since the first release of PHP. Over the years the language has been improved a lot, in terms of performance and features, thanks to the work of many contributors. At the same time, also its adoption among developers is grown dramatically. Looking at the\u2026","rel":"","context":"In &quot;Discussions &amp; Opinions&quot;","block_context":{"text":"Discussions &amp; Opinions","link":"https:\/\/www.audero.it\/blog\/category\/discussions-opinions\/"},"img":{"alt_text":"PHP elephants","src":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/02\/php-elephants.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/02\/php-elephants.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2014\/02\/php-elephants.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":305,"url":"https:\/\/www.audero.it\/blog\/2014\/07\/15\/my-experience-at-4developers-2014\/","url_meta":{"origin":366,"position":4},"title":"My Experience at 4Developers 2014","author":"Aurelio De Rosa","date":"July 15, 2014","format":false,"excerpt":"In March I announced via Twitter my participation as a speaker at 4Developers 2014. 4Developers\u00a02014 was a single-day, multi-track and multi-language conference held in the lovely Warsaw on the 7th of April\u00a02014\u00a0at the\u00a0Gromada Airport Hotel. The tracks for the edition of this year were: Java, .Net, PHP, Python, Front-end (HTML5,\u2026","rel":"","context":"In &quot;Discussions &amp; Opinions&quot;","block_context":{"text":"Discussions &amp; Opinions","link":"https:\/\/www.audero.it\/blog\/category\/discussions-opinions\/"},"img":{"alt_text":"Logo panel 4developers 2014","src":"https:\/\/i0.wp.com\/aurelio.audero.it\/blog\/wp-content\/uploads\/2014\/07\/logo-panel-4developers-2014-225x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":599,"url":"https:\/\/www.audero.it\/blog\/2016\/10\/03\/5-reasons-start-writing-technical-articles\/","url_meta":{"origin":366,"position":5},"title":"5 reasons why you should start writing technical articles","author":"Aurelio De Rosa","date":"October 3, 2016","format":false,"excerpt":"A few weeks ago, LinkedIn has reminded me that it was four years ago (on the 8th of September 2012) when my first technical article, titled Create Your Own HTML5 Environmental Thermometer, went live. The article was published by SitePoint at a time where the editor was Tom Museth (still\u2026","rel":"","context":"In &quot;Discussions &amp; Opinions&quot;","block_context":{"text":"Discussions &amp; Opinions","link":"https:\/\/www.audero.it\/blog\/category\/discussions-opinions\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2016\/10\/knowledge.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2016\/10\/knowledge.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2016\/10\/knowledge.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2016\/10\/knowledge.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2016\/10\/knowledge.jpg?resize=1050%2C600&ssl=1 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/posts\/366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/comments?post=366"}],"version-history":[{"count":6,"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/posts\/366\/revisions"}],"predecessor-version":[{"id":475,"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/posts\/366\/revisions\/475"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/media\/374"}],"wp:attachment":[{"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/media?parent=366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/categories?post=366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.audero.it\/blog\/wp-json\/wp\/v2\/tags?post=366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}