{"id":1408,"date":"2014-02-07T08:57:51","date_gmt":"2014-02-06T23:57:51","guid":{"rendered":"http:\/\/blog.4star.link\/?p=1408"},"modified":"2014-02-07T08:57:51","modified_gmt":"2014-02-06T23:57:51","slug":"git-%e3%83%aa%e3%83%a2%e3%83%bc%e3%83%88%e3%83%96%e3%83%a9%e3%83%b3%e3%83%81%e3%82%92%e5%89%8d%e3%81%ae%e3%83%90%e3%83%bc%e3%82%b8%e3%83%a7%e3%83%b3%e3%81%ab%e6%88%bb%e3%81%99","status":"publish","type":"post","link":"https:\/\/blog.4star.link\/?p=1408","title":{"rendered":"git \u30ea\u30e2\u30fc\u30c8\u30d6\u30e9\u30f3\u30c1\u3092\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u623b\u3059"},"content":{"rendered":"<p>git\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u30ea\u30e2\u30fc\u30c8\u30d6\u30e9\u30f3\u30c1\u306e\u30ed\u30b0\u3092\u623b\u3057\u305f\u3044\u306a\u3068\u304a\u3082\u3063\u3066\u3001<br \/>\n\u30b0\u30b0\u3063\u3066\u307f\u305f\u304c\u3084\u308a\u305f\u3044\u4e8b\u3068\u4e00\u81f4\u3059\u308b\u8a18\u4e8b\u304c\u306a\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<p>\u307e\u305a\u4e0b\u8a18\u3067\u30ed\u30fc\u30ab\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u623b\u3059\u3002<\/p>\n<pre>$git reset --hard\u00a0fdsa2432fda4f189a85a3319f9c782c0a49f8<\/pre>\n<p>\u203bfdsa2432fda4f189a85a3319f9c782c0a49f8\u306f git log\u7b49\u3067\u3069\u3053\u306b\u623b\u308b\u304b\u6c7a\u3081\u308b\u3002<br \/>\n\u203b&#8211;hard\u3092\u3064\u3051\u306a\u3044\u3068\u30ed\u30fc\u30ab\u30eb\u306e\u30bd\u30fc\u30b9\u306f\u623b\u3089\u306a\u3044\u306e\u3067\u7de8\u96c6\u4e2d\u3068\u306a\u308bgit status \u7b49\u3067\u78ba\u8a8d<br \/>\n\u203b\u3082\u3057\u307e\u3061\u304c\u3063\u305f\u30ed\u30b0\u306b\u623b\u3063\u3066\u3057\u307e\u3063\u305f\u308a\u3057\u305f\u3089 git reflog \u3067\u6307\u5b9a\u306eHEAD\u306b\u623b\u308b\uff01<\/p>\n<p>\u305d\u306e\u5f8c\u3001push\u3057\u3066\u30ea\u30e2\u30fc\u30c8\u30d6\u30e9\u30f3\u30c1\u306e\u30ed\u30b0\u3092\u623b\u3059\uff01<\/p>\n<pre>$git push origin master<\/pre>\n<p>\u3059\u308b\u3068\u3053\u3093\u306a\u30a8\u30e9\u30fc\u304c\u3001\u3001\u3001\u3001<\/p>\n<p>To https:\/\/user@examplegitgittesttest.git<br \/>\n! [rejected] master\u00a0-&gt; master\u00a0(non-fast-forward)<br \/>\nerror: failed to push some refs to &#8216;https:\/\/user@examplegitgittesttest.git&#8217;<br \/>\nhint: Updates were rejected because the tip of your current branch is behind<br \/>\nhint: its remote counterpart. Merge the remote changes (e.g. &#8216;git pull&#8217;)<br \/>\nhint: before pushing again.<br \/>\nhint: See the &#8216;Note about fast-forwards&#8217; in &#8216;git push &#8211;help&#8217; for details.<\/p>\n<p>\u3067\u3059\u304c\u3001\u6050\u3089\u304fpush\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3001<br \/>\n\u53e4\u3044\u304b\u3089\u30a8\u30e9\u30fc\u3092\u51fa\u3057\u3066\u304f\u308c\u3066\u3044\u308b\u3088\u3046\u306a\u306e\u3067\uff08\u52dd\u624b\u306a\u63a8\u6e2c\u3067\u3059w\uff09\u3001<br \/>\n\u305d\u3093\u306a\u6642\u306f\u3001\u30ea\u30e2\u30fc\u30c8\u30d6\u30e9\u30f3\u30c1\u540d\u306b\u300c+\u300d\u3092\u8ffd\u52a0\uff01<\/p>\n<pre>$git push origin +master<\/pre>\n<p>\u203b\u5f37\u5236\u7684\u306bpush!!<\/p>\n<p>\u3053\u308c\u3067\u3001\u30ea\u30e2\u30fc\u30c8\u4e0a\u306e\u30ed\u30b0\u3092\u898b\u308b\u3068\u3001\u6307\u5b9a\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u623b\u3063\u3066\u307e\u3057\u305f\uff01<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>git\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u30ea\u30e2\u30fc\u30c8\u30d6\u30e9\u30f3\u30c1\u306e\u30ed\u30b0\u3092\u623b\u3057\u305f\u3044\u306a\u3068\u304a\u3082\u3063\u3066\u3001 \u30b0\u30b0\u3063\u3066\u307f\u305f\u304c\u3084\u308a\u305f\u3044\u4e8b\u3068\u4e00\u81f4\u3059\u308b\u8a18\u4e8b\u304c\u306a\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002 \u307e\u305a\u4e0b\u8a18\u3067\u30ed\u30fc\u30ab\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u623b\u3059\u3002 $git reset &#8211;hard\u00a0fdsa2432 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.4star.link\/?p=1408\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;git \u30ea\u30e2\u30fc\u30c8\u30d6\u30e9\u30f3\u30c1\u3092\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u623b\u3059&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[220],"tags":[219],"class_list":["post-1408","post","type-post","status-publish","format-standard","hentry","category-git","tag-git"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts\/1408"}],"collection":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1408"}],"version-history":[{"count":0,"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts\/1408\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}