{"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":413,"url":"https:\/\/www.audero.it\/blog\/2015\/10\/17\/upload-files-on-github-using-github-js\/","url_meta":{"origin":366,"position":0},"title":"Upload files on GitHub using Github.js","author":"Aurelio De Rosa","date":"October 17, 2015","format":false,"excerpt":"For a few months now, I have been working on a project that employs the GitHub APIs. The application I'm\u00a0building is completely client-side and provides a feature to upload files to a repository on GitHub. To simplify the\u00a0interaction with the API, I'm\u00a0using a library called Github.js. In this article, I'll\u2026","rel":"","context":"In &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/www.audero.it\/blog\/category\/javascript\/"},"img":{"alt_text":"github social coding","src":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/10\/github-social-coding.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/10\/github-social-coding.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/10\/github-social-coding.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/10\/github-social-coding.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":390,"url":"https:\/\/www.audero.it\/blog\/2015\/06\/02\/trick-of-the-day-user-research\/","url_meta":{"origin":366,"position":1},"title":"Trick of the day: User research","author":"Aurelio De Rosa","date":"June 2, 2015","format":false,"excerpt":"As developers we're usually only concerned about code, but the truth is, as I assert in one of my talks, that all we do is useless if we don't have users or our users are unhappy. So, it's important for us to understand how design and UX work and how\u2026","rel":"","context":"In &quot;Trick of the day&quot;","block_context":{"text":"Trick of the day","link":"https:\/\/www.audero.it\/blog\/category\/trick-of-the-day\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":287,"url":"https:\/\/www.audero.it\/blog\/2014\/04\/14\/learn-how-to-write-an-email-seriously\/","url_meta":{"origin":366,"position":2},"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":397,"url":"https:\/\/www.audero.it\/blog\/2015\/06\/16\/trick-of-the-day-the-time-element\/","url_meta":{"origin":366,"position":3},"title":"Trick of the day: The time element","author":"Aurelio De Rosa","date":"June 16, 2015","format":false,"excerpt":"HTML5 introduced several new elements to address many common use cases that developers have faced over the years. As an example you can think to the new audio and video elements that allow you to avoid the use of third-party software like Flash and Silverlight to play audios and videos.\u2026","rel":"","context":"In &quot;Trick of the day&quot;","block_context":{"text":"Trick of the day","link":"https:\/\/www.audero.it\/blog\/category\/trick-of-the-day\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":404,"url":"https:\/\/www.audero.it\/blog\/2015\/07\/14\/trick-of-the-day-css-scroll-snap-points\/","url_meta":{"origin":366,"position":4},"title":"Trick of the day: CSS Scroll Snap Points","author":"Aurelio De Rosa","date":"July 14, 2015","format":false,"excerpt":"When you create a gallery, you usually want to implement a feature where every time the user clicks (or press the ENTER key) on an arrow, you move straight to the next (or previous) image. This effect can also be used to create a website that has several sections, each\u2026","rel":"","context":"In &quot;Trick of the day&quot;","block_context":{"text":"Trick of the day","link":"https:\/\/www.audero.it\/blog\/category\/trick-of-the-day\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/07\/css-scroll-snap-points.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/07\/css-scroll-snap-points.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/07\/css-scroll-snap-points.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/07\/css-scroll-snap-points.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.audero.it\/blog\/wp-content\/uploads\/2015\/07\/css-scroll-snap-points.png?resize=1050%2C600&ssl=1 3x"},"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":5},"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":[]}],"_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}]}}