Using the Reflog to Restore Lost Commits<\/a><\/li><\/ol>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"Interactive Rebase is the Swiss Army knife of Git commands: lots of use cases and lots of possibilities! It’s really a great addition to any developer’s tool chain, because it lets you revise your local commit history\u2014before you share your work with the rest of the team. Let’s see what you can do with an interactive rebase and then look at some practical examples.<\/p>\n","protected":false},"author":247217,"featured_media":355662,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"Interactive Rebase: Clean up your Commit History by @gntr","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[4],"tags":[766,18993],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/11\/interactive-rebase_reword_CLI.gif?fit=700%2C370&ssl=1","jetpack-related-posts":[{"id":354734,"url":"https:\/\/css-tricks.com\/rebase-vs-merge-integrating-changes-in-git\/","url_meta":{"origin":355658,"position":0},"title":"Rebase vs. Merge: Integrating Changes in Git","date":"November 2, 2021","format":false,"excerpt":"This article is part of our \u201cAdvanced Git\u201d series. Be sure to follow us on Twitter or sign up for our newsletter to hear about the next articles! Most developers understand that it's important to use branches in Git. In fact, I've written an entire article on branching strategies in\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/10\/rebase-git.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":356700,"url":"https:\/\/css-tricks.com\/cherry-picking-commits-in-git\/","url_meta":{"origin":355658,"position":1},"title":"Cherry-Picking Commits in Git","date":"November 17, 2021","format":false,"excerpt":"In part 5 of this series, we looked at rebasing and merging. Although there are a couple of differences between git merge and git rebase, both commands have the same goal: they integrate changes from one branch into another.","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/11\/git-cherry-picking.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":316153,"url":"https:\/\/css-tricks.com\/cmdz-for-git-is-here\/","url_meta":{"origin":355658,"position":2},"title":"CMD+Z for Git is Here","date":"July 23, 2020","format":false,"excerpt":"Version control with Git has become a \"commodity\" by now: virtually every software project today uses Git, and virtually every developer knows Git to some extent. This explains why I sometimes hear the following question when I talk about what I do for a living: \"A desktop client for Git?\u2026","rel":"","context":"In "Sponsored"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/07\/tower_testimonials@2x.png?fit=1200%2C550&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":354389,"url":"https:\/\/css-tricks.com\/merge-conflicts-what-they-are-and-how-to-deal-with-them\/","url_meta":{"origin":355658,"position":3},"title":"Merge Conflicts: What They Are and How to Deal with Them\u200b","date":"October 28, 2021","format":false,"excerpt":"Merge conflicts... Nobody likes them. Some of us even fear them. But they are a fact of life when you're working with Git, especially when you're teaming up with other developers. In most cases, merge conflicts aren't as scary as you might think. In this fourth part of our \u201cAdvanced\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/10\/conflict-in-textfile@2x.png?fit=1130%2C622&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":357728,"url":"https:\/\/css-tricks.com\/using-the-reflog-to-restore-lost-commits\/","url_meta":{"origin":355658,"position":4},"title":"Using the Reflog to Restore Lost Commits","date":"November 30, 2021","format":false,"excerpt":"This article is part of our \u201cAdvanced Git\u201d series. Be sure to follow us on Twitter or sign up for our newsletter to hear about future articles! The \u201cReflog\u201d is one of Git\u2019s lesser-known features\u2014but one that can be extremely helpful. Some people refer to it as a \u201csafety net,\u201d\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/11\/pasted-image-0-2.png?fit=1200%2C438&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":352569,"url":"https:\/\/css-tricks.com\/better-collaboration-with-pull-requests\/","url_meta":{"origin":355658,"position":5},"title":"Better Collaboration With Pull Requests","date":"October 11, 2021","format":false,"excerpt":"This article is part of our \u201cAdvanced Git\u201d series. Be sure to follow us on Twitter or sign up for our newsletter to hear about the next articles! In this third installment of our \u201cAdvanced Git\u201d series, we\u2019ll look at pull requests \u2014 a great feature which helps both small\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/09\/Untitled-3-2.png?fit=1200%2C375&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/355658"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/247217"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=355658"}],"version-history":[{"count":10,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/355658\/revisions"}],"predecessor-version":[{"id":358353,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/355658\/revisions\/358353"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media\/355662"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=355658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=355658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=355658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}