{"id":4557,"date":"2023-01-27T02:48:15","date_gmt":"2023-01-26T23:18:15","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/git-at-a-glance-a-cheatsheet-of-30-must-know-commands-1de5\/"},"modified":"2023-01-27T02:48:15","modified_gmt":"2023-01-26T23:18:15","slug":"git-at-a-glance-a-cheatsheet-of-30-must-know-commands-1de5","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/git-at-a-glance-a-cheatsheet-of-30-must-know-commands-1de5\/","title":{"rendered":"Git \u062f\u0631 \u06cc\u06a9 \u0646\u06af\u0627\u0647: \u0628\u0631\u06af\u0647 \u062a\u0642\u0644\u0628\u06cc \u0627\u0632 30 \u062f\u0633\u062a\u0648\u0631\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u06cc\u062f"},"content":{"rendered":"<div data-article-id=\"1342228\" id=\"article-body\">\n<p>\u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u062f \u0648 \u0647\u0645\u06a9\u0627\u0631\u06cc \u0628\u0627 \u062f\u06cc\u06af\u0631\u0627\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u06cc\u06a9 \u06a9\u0627\u0631 \u062f\u0644\u0647\u0631\u0647 \u0622\u0648\u0631 \u0628\u0627\u0634\u062f\u060c \u0627\u0645\u0627 Git \u0622\u0646 \u0631\u0627 \u0622\u0633\u0627\u0646 \u0645\u06cc \u06a9\u0646\u062f.  \u0627\u06cc\u0646 \u0686\u06cc\u062a \u0634\u06cc\u062a \u0627\u06cc\u0646\u062c\u0627\u0633\u062a \u062a\u0627 \u0628\u0627 \u0627\u0631\u0627\u0626\u0647 \u0641\u0647\u0631\u0633\u062a\u06cc \u062c\u0627\u0645\u0639 \u0627\u0632 30 \u062f\u0633\u062a\u0648\u0631 \u0636\u0631\u0648\u0631\u06cc\u060c \u0628\u0647 \u0634\u0645\u0627 \u06a9\u0645\u06a9 \u06a9\u0646\u062f \u062a\u0627 \u0645\u0647\u0627\u0631\u062a \u0647\u0627\u06cc Git \u062e\u0648\u062f \u0631\u0627 \u0628\u0647 \u0633\u0637\u062d \u0628\u0639\u062f\u06cc \u0627\u0631\u062a\u0642\u0627 \u062f\u0647\u06cc\u062f.  \u0627\u0632 \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062e\u0632\u0646 \u062c\u062f\u06cc\u062f \u062a\u0627 \u0627\u062f\u063a\u0627\u0645 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a\u060c \u0627\u06cc\u0646 \u0686\u06cc\u062a\u200c\u0634\u06cc\u062a \u062a\u0645\u0627\u0645 \u0627\u0635\u0648\u0644 \u0627\u0648\u0644\u06cc\u0647\u200c\u0627\u06cc \u0631\u0627 \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0633\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u06af\u0631\u062f\u0634 \u06a9\u0627\u0631 \u0648 \u0622\u0633\u0627\u0646\u200c\u062a\u0631 \u06a9\u0631\u062f\u0646 \u0632\u0646\u062f\u06af\u06cc\u200c\u062a\u0627\u0646 \u0628\u0647\u200c\u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u0647 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u06cc\u062f\u060c \u067e\u0648\u0634\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f.  \u0686\u0647 \u062a\u0627\u0632\u0647 \u0648\u0627\u0631\u062f Git \u0628\u0627\u0634\u06cc\u062f \u0648 \u0686\u0647 \u06cc\u06a9 \u06a9\u0627\u0631\u0628\u0631 \u0628\u0627\u062a\u062c\u0631\u0628\u0647\u060c \u0627\u06cc\u0646 cheatsheet \u0645\u0646\u0628\u0639 \u0627\u0631\u0632\u0634\u0645\u0646\u062f\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0628\u0627\u06cc\u062f \u062f\u0631 \u062f\u0633\u062a \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f.<\/p>\n<ol>\n<li>\u06cc\u06a9 \u0645\u062e\u0632\u0646 \u062c\u062f\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f: <code>git init<\/code>\n<\/li>\n<li>\u06cc\u06a9 \u0645\u062e\u0632\u0646 \u0645\u0648\u062c\u0648\u062f \u0631\u0627 \u0634\u0628\u06cc\u0647 \u0633\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f: <code>git clone [repository url]<\/code>\n<\/li>\n<li>\u0648\u0636\u0639\u06cc\u062a \u0645\u062e\u0632\u0646 \u062e\u0648\u062f \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u062f: <code>git status<\/code>\n<\/li>\n<li>\u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0628\u0647 \u0645\u0646\u0637\u0642\u0647 \u0635\u062d\u0646\u0647: <code>git add [file name]<\/code>\n<\/li>\n<li>\u0627\u0646\u062c\u0627\u0645 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a: <code>git commit -m \"[commit message]\"<\/code>\n<\/li>\n<li>\u0645\u0634\u0627\u0647\u062f\u0647 \u062a\u0627\u0631\u06cc\u062e\u0686\u0647 \u06a9\u0627\u0645\u06cc\u062a: <code>git log<\/code>\n<\/li>\n<li>\u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u0641\u0647\u0631\u0633\u062a \u06a9\u0627\u0631\u06cc \u0648 \u0646\u0627\u062d\u06cc\u0647 \u0645\u0631\u062d\u0644\u0647 \u0628\u0646\u062f\u06cc \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0646\u06cc\u062f: <code>git diff<\/code>\n<\/li>\n<li>\u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u0627\u0633\u062a\u06cc\u062c\u06cc\u0646\u06af \u0646\u0627\u062d\u06cc\u0647 \u0648 \u0622\u062e\u0631\u06cc\u0646 \u06a9\u0627\u0645\u06cc\u062a \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0646\u06cc\u062f: <code>git diff --staged<\/code>\n<\/li>\n<li>\u062d\u0630\u0641 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u062f\u0631 \u0641\u0647\u0631\u0633\u062a \u06a9\u0627\u0631\u06cc: <code>git checkout [file name]<\/code>\n<\/li>\n<li>\u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0631\u0627 \u062f\u0631 \u0646\u0627\u062d\u06cc\u0647 \u0645\u0631\u062d\u0644\u0647 \u0628\u0646\u062f\u06cc \u06a9\u0646\u0627\u0631 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f: <code>git reset [file name]<\/code>\n<\/li>\n<li>\u0631\u062f \u06a9\u0631\u062f\u0646 \u06cc\u06a9 \u062a\u0639\u0647\u062f: <code>git revert [commit hash]<\/code>\n<\/li>\n<li>\u062d\u0630\u0641 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0627\u0632 \u0645\u062e\u0632\u0646: <code>git rm [file name]<\/code>\n<\/li>\n<li>\u062a\u063a\u06cc\u06cc\u0631 \u0646\u0627\u0645 \u0641\u0627\u06cc\u0644 \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u0645\u062e\u0632\u0646: <code>git mv [old file name] [new file name]<\/code>\n<\/li>\n<li>\u0646\u0645\u0627\u06cc\u0634 \u0634\u0627\u062e\u0647 \u0647\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u0645\u062e\u0632\u0646: <code>git branch<\/code>\n<\/li>\n<li>\u06cc\u06a9 \u0634\u0639\u0628\u0647 \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f: <code>git branch [branch name]<\/code>\n<\/li>\n<li>\u062c\u0627\u0628\u062c\u0627\u06cc\u06cc \u0628\u0647 \u0634\u0639\u0628\u0647 \u062f\u06cc\u06af\u0631\u06cc: <code>git checkout [branch name]<\/code>\n<\/li>\n<li>\u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0627\u062f\u063a\u0627\u0645 \u0627\u0632 \u06cc\u06a9 \u0634\u0627\u062e\u0647 \u0628\u0647 \u0634\u0627\u062e\u0647 \u062f\u06cc\u06af\u0631: <code>git merge [branch name]<\/code>\n<\/li>\n<li>\u0646\u0645\u0627\u06cc\u0634 \u0645\u062e\u0627\u0632\u0646 \u0631\u0627\u0647 \u062f\u0648\u0631: <code>git remote<\/code>\n<\/li>\n<li>\u0646\u0645\u0627\u06cc\u0634 \u0645\u062e\u0627\u0632\u0646 \u0631\u0627\u0647 \u062f\u0648\u0631: <code>git remote -v<\/code>\n<\/li>\n<li>\u06cc\u06a9 \u0645\u062e\u0632\u0646 \u0627\u0632 \u0631\u0627\u0647 \u062f\u0648\u0631 \u062c\u062f\u06cc\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f: <code>git remote add [remote name] [repository url]<\/code>\n<\/li>\n<li>\u0641\u0634\u0627\u0631 \u062f\u0627\u062f\u0646 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0628\u0647 \u06cc\u06a9 \u0645\u062e\u0632\u0646 \u0631\u0627\u0647 \u062f\u0648\u0631: <code>git push [remote name] [branch name]<\/code>\n<\/li>\n<li>\u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0631\u0627 \u0627\u0632 \u06cc\u06a9 \u0645\u062e\u0632\u0646 \u0631\u0627\u0647 \u062f\u0648\u0631 \u0628\u06a9\u0634\u06cc\u062f: <code>git pull [remote name] [branch name]<\/code>\n<\/li>\n<li>\u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0646 \u0628\u0631\u0686\u0633\u0628 \u0647\u0627 \u062f\u0631 \u0645\u062e\u0632\u0646: <code>git tag<\/code>\n<\/li>\n<li>\u06cc\u06a9 \u0628\u0631\u0686\u0633\u0628 \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f: <code>git tag -a [tag name] -m \"[tag message]\"<\/code>\n<\/li>\n<li>\u06cc\u06a9 \u0628\u0631\u0686\u0633\u0628 \u062e\u0627\u0635 \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u062f: <code>git checkout [tag name]<\/code>\n<\/li>\n<li>\u0646\u0645\u0627\u06cc\u0634 \u062a\u0627\u0631\u06cc\u062e\u0686\u0647 \u06cc\u06a9 \u0641\u0627\u06cc\u0644: <code>git log -p [file name]<\/code>\n<\/li>\n<li>commit \u0647\u0627\u06cc\u06cc \u0631\u0627 \u0646\u0634\u0627\u0646 \u062f\u0647\u06cc\u062f \u06a9\u0647 \u0634\u0627\u0645\u0644 \u06cc\u06a9 \u0631\u0634\u062a\u0647 \u062e\u0627\u0635 \u0647\u0633\u062a\u0646\u062f: <code>git log -S [string]<\/code>\n<\/li>\n<li>\u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0646 \u062a\u0639\u0647\u062f\u0627\u062a\u06cc \u06a9\u0647 \u062a\u0648\u0633\u0637 \u06cc\u06a9 \u0646\u0648\u06cc\u0633\u0646\u062f\u0647 \u062e\u0627\u0635 \u0627\u0646\u062c\u0627\u0645 \u0634\u062f\u0647 \u0627\u0633\u062a: <code>git log --author=\n\t\t<div class=\"clearfix\"><\/div>\n\t\t<div class=\"about-author about-author-box container-wrapper\">\n\t\t\t<div class=\"author-avatar\">\n\t\t\t\t<img decoding=\"async\" src=\"\" alt=\"\" title=\"\">\n\t\t\t<\/div>\n\t\t\t<div class=\"author-info\">\n\t\t\t\t<h4>About the author<\/h4>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/code>\n<\/li>\n<li>commit \u0647\u0627\u06cc\u06cc \u0631\u0627 \u06a9\u0647 \u062f\u0631 \u06cc\u06a9 \u0628\u0627\u0632\u0647 \u062a\u0627\u0631\u06cc\u062e\u06cc \u062e\u0627\u0635 \u0627\u0646\u062c\u0627\u0645 \u0634\u062f\u0647 \u0627\u0646\u062f \u0646\u0634\u0627\u0646 \u062f\u0647\u06cc\u062f: <code>git log --since=[date] --until=[date]<\/code>\n<\/li>\n<li>\u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0646 commit \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u062f\u0631 \u06cc\u06a9 \u0634\u0627\u062e\u0647 \u062e\u0627\u0635 \u0627\u0646\u062c\u0627\u0645 \u0634\u062f\u0647 \u0627\u0633\u062a: <code>git log [branch name]<\/code>\n<\/li>\n<\/ol>\n<p>\u0644\u0637\u0641\u0627\u064b \u062a\u0648\u062c\u0647 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u0627\u06cc\u0646 \u0644\u06cc\u0633\u062a\u06cc \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0645\u062a\u062f\u0627\u0648\u0644 Git \u0627\u0633\u062a \u0648 \u0628\u0633\u06cc\u0627\u0631\u06cc \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u062f\u06cc\u06af\u0631 \u0646\u06cc\u0632 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0622\u0646\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.  \u0639\u0644\u0627\u0648\u0647 \u0628\u0631 \u0627\u06cc\u0646\u060c \u0647\u0631 \u062f\u0633\u062a\u0648\u0631 \u062f\u0627\u0631\u0627\u06cc \u06af\u0632\u06cc\u0646\u0647\u200c\u0647\u0627 \u0648 \u067e\u0631\u0686\u0645\u200c\u0647\u0627\u06cc \u0632\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u0622\u0646\u0647\u0627 \u0628\u0631\u0627\u06cc \u0633\u0641\u0627\u0631\u0634\u06cc \u06a9\u0631\u062f\u0646 \u0631\u0641\u062a\u0627\u0631 \u0622\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f.  \u0645\u0646 \u0628\u0647 \u0634\u0645\u0627 \u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0645\u06cc \u06a9\u0646\u0645 \u0627\u0632 \u0645\u0633\u062a\u0646\u062f\u0627\u062a \u0631\u0633\u0645\u06cc Git \u0628\u0631\u0627\u06cc \u06a9\u0633\u0628 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u06cc\u0634\u062a\u0631 \u062f\u0631 \u0645\u0648\u0631\u062f \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0645\u062e\u062a\u0644\u0641 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u062f \u0648 \u0647\u0645\u06a9\u0627\u0631\u06cc \u0628\u0627 \u062f\u06cc\u06af\u0631\u0627\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u06cc\u06a9 \u06a9\u0627\u0631 \u062f\u0644\u0647\u0631\u0647 \u0622\u0648\u0631 \u0628\u0627\u0634\u062f\u060c \u0627\u0645\u0627 Git \u0622\u0646 \u0631\u0627 \u0622\u0633\u0627\u0646 \u0645\u06cc \u06a9\u0646\u062f. \u0627\u06cc\u0646 \u0686\u06cc\u062a \u0634\u06cc\u062a \u0627\u06cc\u0646\u062c\u0627\u0633\u062a \u062a\u0627 \u0628\u0627 \u0627\u0631\u0627\u0626\u0647 \u0641\u0647\u0631\u0633\u062a\u06cc \u062c\u0627\u0645\u0639 \u0627\u0632 30 \u062f\u0633\u062a\u0648\u0631 \u0636\u0631\u0648\u0631\u06cc\u060c \u0628\u0647 \u0634\u0645\u0627 \u06a9\u0645\u06a9 \u06a9\u0646\u062f \u062a\u0627 \u0645\u0647\u0627\u0631\u062a \u0647\u0627\u06cc Git \u062e\u0648\u062f \u0631\u0627 \u0628\u0647 \u0633\u0637\u062d \u0628\u0639\u062f\u06cc \u0627\u0631\u062a\u0642\u0627 \u062f\u0647\u06cc\u062f. \u0627\u0632 \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062e\u0632\u0646 \u062c\u062f\u06cc\u062f \u062a\u0627 \u0627\u062f\u063a\u0627\u0645 &hellip;<\/p>\n","protected":false},"author":2,"featured_media":4558,"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-4557","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/4557","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=4557"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/4557\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media\/4558"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=4557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=4557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=4557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}