{"id":13787,"date":"2022-04-21T14:49:34","date_gmt":"2022-04-21T14:49:34","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=13787"},"modified":"2024-02-16T10:41:16","modified_gmt":"2024-02-16T10:41:16","slug":"modify-commit-in-history-git","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=13787","title":{"rendered":"Modify commit in history (Git)"},"content":{"rendered":"<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\n# Pull from remote (optional)\r\ngit pull\r\n\r\n# Find the commit\r\ngit log\r\n\r\n# Select for edit\r\ngit rebase -i &lt;commit-hash&gt;^ # &#039;pick&#039; --&gt; &#039;edit&#039;\r\n\r\n# Change and add\r\ngit add &lt;path_to_file&gt;\r\n\r\n# Commit the change\r\ngit commit --amend\r\n\r\n# Finish the rebase\r\ngit rebase --continue\r\n\r\n# Push to remote (optional)\r\ngit push -f\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[24],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/13787"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13787"}],"version-history":[{"count":1,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/13787\/revisions"}],"predecessor-version":[{"id":16809,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/13787\/revisions\/16809"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13787"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}