{"id":83,"date":"2022-11-10T19:21:30","date_gmt":"2022-11-10T11:21:30","guid":{"rendered":"https:\/\/www.666818.xyz\/?p=83"},"modified":"2023-01-28T17:06:16","modified_gmt":"2023-01-28T09:06:16","slug":"%e5%b8%b8%e7%94%a8git%e6%93%8d%e4%bd%9c%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.wkv.cc\/index.php\/2022\/11\/10\/%e5%b8%b8%e7%94%a8git%e6%93%8d%e4%bd%9c%e5%91%bd%e4%bb%a4\/","title":{"rendered":"\u5e38\u7528GIT\u64cd\u4f5c"},"content":{"rendered":"<pre class=\"code\">git add --&gt;\u6dfb\u52a0\u8fdb\u6682\u5b58\u533a<\/pre>\n<pre class=\"code\">git commit --&gt;\u63d0\u4ea4\u5230\u672c\u5730\u5386\u53f2\u4ed3\u5e93<\/pre>\n<pre class=\"code\">git log --&gt;\u67e5\u770b\u65e5\u5fd7<\/pre>\n<pre class=\"code\">git reflog --&gt; \u67e5\u770b\u65e5\u5fd7<\/pre>\n<pre class=\"code\">git reset --hard --&gt;git\u5386\u53f2\u7248\u672c\u5207\u6362<\/pre>\n<pre class=\"code\">git branch --&gt;\u67e5\u770b\u5206\u652f\u5217\u8868<\/pre>\n<pre class=\"code\">git branch xxx --&gt;\u521b\u5efa\u65b0\u5206\u652f<\/pre>\n<pre class=\"code\">git checkout --&gt;\u5207\u6362\u5206\u652f<\/pre>\n<pre class=\"code\">git merge \u5206\u652f\u540d --&gt;\u5408\u5e76\u5206\u652f<\/pre>\n<pre class=\"code\">git branch -d \u5206\u652f\u540d --&gt;\u5220\u9664\u5206\u652f<\/pre>\n<pre class=\"code\">git config user.name --&gt;\u67e5\u770bgit\u8d26\u6237<\/pre>\n<pre class=\"code\">git config user.email --&gt;\u67e5\u770bgit\u90ae\u7bb1<\/pre>\n<pre class=\"code\">git config --global user.name \"\u8d26\u6237\u540d\"<\/pre>\n<pre class=\"code\">git config --global user.email \"\u90ae\u7bb1\"<\/pre>\n<pre class=\"code\">cd ~\/.ssh --&gt;\u67e5\u770b\u662f\u5426\u751f\u6210\u8fc7ssh\u516c\u94a5<\/pre>\n<pre class=\"code\">ssh-keygen -t rsa -C \"\u90ae\u7bb1\" --&gt;\u751f\u6210ssh\u516c\u94a5<\/pre>\n<pre class=\"code\">cat ~\/.ssh\/id_rsa.pub --&gt;\u67e5\u770b\u751f\u6210\u516c\u94a5<\/pre>\n<pre class=\"code\">ssh -T git@github.com --&gt;\u6d4b\u8bd5\u516c\u94a5\u8fde\u901a\u6027<\/pre>\n<pre class=\"code\">git remote add \u81ea\u5b9a\u4e49\u8fdc\u7a0b\u4ed3\u5e93\u540d\u79f0 \u8fdc\u7a0b\u4ed3\u5e93URL --&gt; \u91cd\u547d\u540d\u8fdc\u7a0b\u4ed3\u5e93\u540d\u79f0<\/pre>\n<pre class=\"code\">git push -u \u81ea\u5b9a\u4e49\u8fdc\u7a0b\u4ed3\u5e93\u540d\u79f0 \u5206\u652f\u540d --&gt;\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93<\/pre>\n<pre class=\"code\">git clone \u8fdc\u7a0b\u4ed3\u5e93\u5730\u5740 --&gt;\u514b\u9686\u8fdc\u7a0b\u4ed3\u5e93<\/pre>\n<pre class=\"code\">git pull \u8fdc\u7a0b\u4ed3\u5e93\u540d \u5206\u652f\u540d --&gt; \u62c9\u53d6\u8fdc\u7a0b\u4ed3\u5e93<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>git add &#8211;&gt;\u6dfb\u52a0\u8fdb\u6682\u5b58\u533a git commit &#8211;&gt;\u63d0\u4ea4\u5230\u672c\u5730\u5386\u53f2\u4ed3\u5e93 git log [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12,13],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-biancheng","tag-git","tag-13"],"_links":{"self":[{"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/comments?post=83"}],"version-history":[{"count":2,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":153,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/posts\/83\/revisions\/153"}],"wp:attachment":[{"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/categories?post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/tags?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}