{"id":586,"date":"2021-11-16T12:08:01","date_gmt":"2021-11-16T03:08:01","guid":{"rendered":"https:\/\/plusload.net\/?p=586"},"modified":"2021-11-16T18:04:06","modified_gmt":"2021-11-16T09:04:06","slug":"git-command-note","status":"publish","type":"post","link":"https:\/\/plusload.net\/?p=586","title":{"rendered":"Git Command Note"},"content":{"rendered":"<h4>\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u306e\u30af\u30ed\u30fc\u30f3<\/h4>\n<pre><span class=\"nv\">$ <\/span>git clone https:\/\/github.com\/XXXX\/XXXXXX.git<\/pre>\n<h4>\u30d7\u30eb<\/h4>\n<pre><span class=\"nv\">$ <\/span>git pull<\/pre>\n<h4>\u30d5\u30a1\u30a4\u30eb\u8ffd\u52a0<\/h4>\n<pre><span class=\"nv\">$ <\/span>git add &lt;\u30d5\u30a1\u30a4\u30eb\u540d&gt;<\/pre>\n<p>\u8ffd\u52a0\u30d5\u30a1\u30a4\u30eb\u306e\u53d6\u308a\u6d88\u3057<\/p>\n<pre><span class=\"nv\">$ <\/span>git reset HEAD &lt;\u30d5\u30a1\u30a4\u30eb\u540d&gt;<\/pre>\n<h4>\u30b3\u30df\u30c3\u30c8<\/h4>\n<pre><span class=\"nv\">$ <\/span>git commit <span class=\"nt\">-m<\/span> <span class=\"s2\">\"\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\"<\/span><\/pre>\n<h4>\u30b3\u30df\u30c3\u30c8\u53d6\u308a\u6d88\u3057<\/h4>\n<pre><span class=\"nv\">$ <\/span>git reset <span class=\"nt\">--hard<\/span> HEAD^<\/pre>\n<h4>\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u78ba\u8a8d<\/h4>\n<pre><span class=\"nv\">$ <\/span>git status<\/pre>\n<h4>\u30ed\u30fc\u30ab\u30eb\u3001\u30ea\u30e2\u30fc\u30c8\u306e\u5dee\u5206\u3092\u78ba\u8a8d<\/h4>\n<pre><span class=\"nv\">$ <\/span>git diff &lt;\u30d5\u30a1\u30a4\u30eb\u540d&gt;<\/pre>\n<h4>\u5c65\u6b74<\/h4>\n<pre><span class=\"nv\">$ <\/span>git log<\/pre>\n<h4>\u30d7\u30c3\u30b7\u30e5<\/h4>\n<pre><span class=\"nv\">$ <\/span>git push origin &lt;\u30d6\u30e9\u30f3\u30c1\u540d&gt;<\/pre>\n<h4>\u30ed\u30fc\u30ab\u30eb\u306e\u5909\u66f4\u3092\u5168\u3066\u5ec3\u68c4\u3057\u3066\u6700\u521d\u306b\u623b\u3059<\/h4>\n<pre><span class=\"nv\">$ <\/span>git checkout .<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u306e\u30af\u30ed\u30fc\u30f3 $ git clone https:\/\/github.com\/XXXX\/XXXXXX.git \u30d7\u30eb $ git pull \u30d5\u30a1\u30a4\u30eb\u8ffd\u52a0 $ git add &lt;\u30d5\u30a1\u30a4\u30eb\u540d&gt; \u8ffd\u52a0\u30d5\u30a1\u30a4\u30eb&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-586","post","type-post","status-publish","format-standard","hentry","category-gittips"],"_links":{"self":[{"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/posts\/586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plusload.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=586"}],"version-history":[{"count":4,"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/posts\/586\/revisions"}],"predecessor-version":[{"id":590,"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/posts\/586\/revisions\/590"}],"wp:attachment":[{"href":"https:\/\/plusload.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plusload.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plusload.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}