{"id":1308,"date":"2020-11-24T16:47:36","date_gmt":"2020-11-24T16:47:36","guid":{"rendered":"https:\/\/kalkus.dev\/?p=1308"},"modified":"2023-08-24T23:32:47","modified_gmt":"2023-08-24T23:32:47","slug":"how-to-reject-all-changes-in-git","status":"publish","type":"post","link":"https:\/\/kalkus.dev\/blog\/2020\/11\/24\/how-to-reject-all-changes-in-git\/","title":{"rendered":"How to reject all changes in Git?"},"content":{"rendered":"\n<p>If you want to reject all changes in your local git repository you must:<\/p>\n\n\n\n<ol><li><em>Discard local changes<\/em><\/li><li><em>Remove untracked files<\/em><\/li><\/ol>\n\n\n\n<p>To discard all local changes run:<\/p>\n\n\n\n<p><code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">git reset --hard<\/code><\/p>\n\n\n\n<p>To remove untracked files run:<\/p>\n\n\n\n<p><code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">git clean -df<\/code><\/p>\n\n\n\n<p>After executing these two commands you will have no changes whatsoever. If you run git status you should receive:<br><br><em>\u201cnothing to commit, working tree clean\u201d<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to reject all changes in your local git repository you must: Discard local changes Remove untracked files To discard all local changes run: git reset &#8211;hard To remove untracked files run: git clean -df After executing these two commands you will have no changes whatsoever. If you run git status you should [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1319,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[202,1],"tags":[],"_links":{"self":[{"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/posts\/1308"}],"collection":[{"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/comments?post=1308"}],"version-history":[{"count":4,"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/posts\/1308\/revisions"}],"predecessor-version":[{"id":1322,"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/posts\/1308\/revisions\/1322"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/media\/1319"}],"wp:attachment":[{"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/media?parent=1308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/categories?post=1308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kalkus.dev\/blog\/wp-json\/wp\/v2\/tags?post=1308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}