{"id":80542,"date":"2024-10-18T00:23:55","date_gmt":"2024-10-17T20:53:55","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/quick-tip-git-undo-commands-1kj9\/"},"modified":"2024-10-18T00:23:55","modified_gmt":"2024-10-17T20:53:55","slug":"quick-tip-git-undo-commands-1kj9","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/quick-tip-git-undo-commands-1kj9\/","title":{"rendered":"\u0646\u06a9\u062a\u0647 \u0633\u0631\u06cc\u0639: Git Undo Commands"},"content":{"rendered":"<p>Summarize this content to 400 words in Persian Lang \u0628\u0631\u0627\u06cc \u0648\u0627\u06af\u0631\u062f \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u062f\u0631 Git\u060c \u0628\u0633\u062a\u0647 \u0628\u0647 \u0622\u0646\u0686\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u062f \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>\u0631\u0648\u0634 1: \u0644\u063a\u0648 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u063a\u06cc\u0631\u0645\u062a\u0639\u0647\u062f \u062f\u0631 \u0641\u0647\u0631\u0633\u062a \u06a9\u0627\u0631\u06cc:<\/p>\n<p>git checkout &#8212; &lt;file&gt;<\/p>\n<p>\u0631\u0648\u0634 2: \u062d\u0630\u0641 \u0645\u0631\u062d\u0644\u0647 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0645\u0631\u062d\u0644\u0647 \u0628\u0646\u062f\u06cc \u0634\u062f\u0647:<\/p>\n<p>git reset &lt;file&gt;<\/p>\n<p>\u0631\u0648\u0634 3: \u0622\u062e\u0631\u06cc\u0646 commit \u0631\u0627 \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f \u0627\u0645\u0627 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0631\u0627 \u062d\u0641\u0638 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>git reset &#8211;soft HEAD~1<\/p>\n<p>\u0631\u0648\u0634 4: \u0622\u062e\u0631\u06cc\u0646 commit \u0631\u0627 \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f \u0648 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0631\u0627 \u06a9\u0646\u0627\u0631 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f:<\/p>\n<p>git reset &#8211;hard HEAD~1<\/p>\n<p>\u062f\u0633\u062a\u0648\u0631 \u0631\u0627 \u0628\u0631 \u0627\u0633\u0627\u0633 \u0646\u06cc\u0627\u0632 \u062e\u0648\u062f \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f. \u0647\u0645\u06cc\u0634\u0647 \u0645\u062d\u062a\u0627\u0637 \u0628\u0627\u0634\u06cc\u062f \u0628\u0627 &#8211;hard \u0632\u06cc\u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0631\u0627 \u0628\u0647 \u0637\u0648\u0631 \u0628\u0631\u06af\u0634\u062a \u0646\u0627\u067e\u0630\u06cc\u0631 \u062d\u0630\u0641 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0648\u0627\u06af\u0631\u062f \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u062f\u0631 Git\u060c \u0628\u0633\u062a\u0647 \u0628\u0647 \u0622\u0646\u0686\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u062f \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<p><strong>\u0631\u0648\u0634 1:<\/strong> \u0644\u063a\u0648 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u063a\u06cc\u0631\u0645\u062a\u0639\u0647\u062f \u062f\u0631 \u0641\u0647\u0631\u0633\u062a \u06a9\u0627\u0631\u06cc:\n<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>git checkout <span class=\"nt\">--<\/span> &lt;file&gt;\n<\/code><\/pre>\n<\/div>\n<p><strong>\u0631\u0648\u0634 2:<\/strong> \u062d\u0630\u0641 \u0645\u0631\u062d\u0644\u0647 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0645\u0631\u062d\u0644\u0647 \u0628\u0646\u062f\u06cc \u0634\u062f\u0647:\n<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>git reset &lt;file&gt;\n<\/code><\/pre>\n<\/div>\n<p><strong>\u0631\u0648\u0634 3:<\/strong> \u0622\u062e\u0631\u06cc\u0646 commit \u0631\u0627 \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f \u0627\u0645\u0627 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0631\u0627 \u062d\u0641\u0638 \u06a9\u0646\u06cc\u062f:\n<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>git reset <span class=\"nt\">--soft<\/span> HEAD~1\n<\/code><\/pre>\n<\/div>\n<p><strong>\u0631\u0648\u0634 4:<\/strong> \u0622\u062e\u0631\u06cc\u0646 commit \u0631\u0627 \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f \u0648 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0631\u0627 \u06a9\u0646\u0627\u0631 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f:\n<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>git reset <span class=\"nt\">--hard<\/span> HEAD~1\n<\/code><\/pre>\n<\/div>\n<p>\u062f\u0633\u062a\u0648\u0631 \u0631\u0627 \u0628\u0631 \u0627\u0633\u0627\u0633 \u0646\u06cc\u0627\u0632 \u062e\u0648\u062f \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f. \u0647\u0645\u06cc\u0634\u0647 \u0645\u062d\u062a\u0627\u0637 \u0628\u0627\u0634\u06cc\u062f \u0628\u0627 <code>--hard<\/code> \u0632\u06cc\u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0631\u0627 \u0628\u0647 \u0637\u0648\u0631 \u0628\u0631\u06af\u0634\u062a \u0646\u0627\u067e\u0630\u06cc\u0631 \u062d\u0630\u0641 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summarize this content to 400 words in Persian Lang \u0628\u0631\u0627\u06cc \u0648\u0627\u06af\u0631\u062f \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u062f\u0631 Git\u060c \u0628\u0633\u062a\u0647 \u0628\u0647 \u0622\u0646\u0686\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u062f \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f: \u0631\u0648\u0634 1: \u0644\u063a\u0648 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u063a\u06cc\u0631\u0645\u062a\u0639\u0647\u062f \u062f\u0631 \u0641\u0647\u0631\u0633\u062a \u06a9\u0627\u0631\u06cc: git checkout &#8212; &lt;file&gt; \u0631\u0648\u0634 2: \u062d\u0630\u0641 \u0645\u0631\u062d\u0644\u0647 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0645\u0631\u062d\u0644\u0647 \u0628\u0646\u062f\u06cc \u0634\u062f\u0647: git reset &lt;file&gt; \u0631\u0648\u0634 3: \u0622\u062e\u0631\u06cc\u0646 commit \u0631\u0627 &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[339],"tags":[],"class_list":["post-80542","post","type-post","status-publish","format-standard","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/80542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/comments?post=80542"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/80542\/revisions"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=80542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=80542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=80542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}