
{"id":6881,"date":"2018-03-15T08:20:20","date_gmt":"2018-03-14T23:20:20","guid":{"rendered":"https:\/\/tetraup.com\/news_topics\/archives\/6881"},"modified":"2024-09-05T15:56:39","modified_gmt":"2024-09-05T06:56:39","slug":"git-essentials-part3","status":"publish","type":"post","link":"https:\/\/tetraup.com\/news_topics\/column\/git-essentials-part3\/","title":{"rendered":"\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3082\u77e5\u3089\u306a\u3044\u3068\u30e4\u30d0\u30a4Git Part3"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"700\" src=\"https:\/\/tetraup.com\/news_topics\/wp-content\/uploads\/2018\/03\/git3.png\" alt=\"\" class=\"wp-image-9284\"\/><\/figure>\n\n\n<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u4eca\u56de\u306f\u7af6\u5408\u306e\u89e3\u6c7a\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002<br \/>\n\u524d\u56de\u307e\u3067\u306e\u8a18\u4e8b\u306f\u3053\u3061\u3089<br \/>\n<a href=\"https:\/\/knocknote.jp\/topics\/2018\/03\/05y\/ \u200e\">\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3082\u77e5\u3089\u306a\u3044\u3068\u30e4\u30d0\u30a4Git Part1<\/a><br \/>\n<a href=\"https:\/\/knocknote.jp\/topics\/2018\/03\/11y\/ \u200e\">\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3082\u77e5\u3089\u306a\u3044\u3068\u30e4\u30d0\u30a4Git Part2<\/a><\/p>\n<h2>\u7af6\u5408\u306e\u767a\u751f<\/h2>\n<p>\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u540c\u3058\u7b87\u6240\u3092\u5909\u66f4\u3057\u3066\u3044\u305f\u5834\u5408\u306b\u7af6\u5408\u304c\u767a\u751f\u3059\u308b\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u306f\u3069\u3061\u3089\u306e\u5909\u66f4\u3092\u63a1\u7528\u3059\u308b\u304b\u3092\u81ea\u52d5\u7684\u306b\u5224\u65ad\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3002<\/p>\n<h2>\u7af6\u5408\u3092\u4f5c\u308b<\/h2>\n<p>\u540c\u3058\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u5171\u6709\u3057\u3066\u3044\u308b2\u4eba\u306e\u30e6\u30fc\u30b6\u30fc\u3001User1\u3068User2\u3092\u7528\u610f\u3059\u308b\u3002<br \/>\n\u307e\u305a\u306fUser1\u3067index.php\u306b\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/tetraup.com\/feed\/wp-content\/uploads\/2018\/03\/img_1-1.png\" alt=\"\u753b\u50cf\" \/><br \/>\nGit\u3092\u7c21\u5358\u306b\u4f7f\u7528\u3067\u304d\u308bGUI\u3001SourceTree\u3067\u30b3\u30df\u30c3\u30c8\u30fb\u30d7\u30c3\u30b7\u30e5\u3092\u884c\u3046\u3002\uff08\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\uff1a\u304a\u306f\u3088\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u3092\u8ffd\u52a0\uff09<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/tetraup.com\/feed\/wp-content\/uploads\/2018\/03\/img_2-2.png\" alt=\"\u753b\u50cf\" \/><br \/>\n\u6b21\u306b\u3001User1\u304c\u8ffd\u52a0\u3057\u305f\u3082\u306e\u3068\u7570\u306a\u308b\u30b3\u30fc\u30c9\u3092\u3001User2\u3067\u540c\u3058\u7b87\u6240\u306b\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/tetraup.com\/feed\/wp-content\/uploads\/2018\/03\/img_3-1.png\" alt=\"\u753b\u50cf\" \/><br \/>\n\u6e96\u5099\u304c\u3067\u304d\u305f\u306e\u3067\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089Git\u306e\u64cd\u4f5c\u3092\u3059\u308b\u3002<br \/>\n\u307e\u305a\u3001\u5909\u66f4\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u306b\u8ffd\u52a0\u3059\u308b\u3002<br \/>\n[sql]<br \/>\ngit add \uff08\u30d5\u30a1\u30a4\u30eb\u540d\uff09<br \/>\ngit add index.php<br \/>\n[\/sql]<br \/>\n\u6b21\u306b\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5165\u529b\u3057\u3066\u30b3\u30df\u30c3\u30c8\u3059\u308b\u3002<br \/>\n[sql]<br \/>\ngit commit -m &#8216;\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8&#8217;<br \/>\ngit commit -m &#8216;Good Morning!\u3092\u8ffd\u52a0&#8217;<br \/>\n[\/sql]<br \/>\n\u3053\u306e\u72b6\u614b\u3067\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3068\u3053\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3002<br \/>\n[sql]git push[\/sql]<br \/>\n[sql]<br \/>\nTo https:\/\/bitbucket.org\/username\/test.git<br \/>\n! [rejected] master -&gt; master (fetch first)<br \/>\nerror: failed to push some refs to &#8216;https:\/\/username@bitbucket.org\/username\/test.git&#8217;<br \/>\nhint: Updates were rejected because the remote contains work that you do<br \/>\nhint: not have locally. This is usually caused by another repository pushing<br \/>\nhint: to the same ref. You may want to first integrate the remote changes<br \/>\nhint: (e.g., &#8216;git pull &#8230;&#8217;) before pushing again.<br \/>\nhint: See the &#8216;Note about fast-forwards&#8217; in &#8216;git push &#8211;help&#8217; for details.<br \/>\n[\/sql]<br \/>\n\u3053\u308c\u3067\u7af6\u5408\u304c\u767a\u751f\u3057\u305f\u3002<\/p>\n<h2>\u7af6\u5408\u306e\u89e3\u6c7a<\/h2>\n<p>\u4ed6\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30d7\u30c3\u30b7\u30e5\u3057\u305f\u3082\u306e\u304c\u3042\u308b\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u307e\u305a\u306f\u30d7\u30eb\u3059\u308b\u3002<br \/>\n[sql]git pull[\/sql]<br \/>\n[sql]<br \/>\nremote: Counting objects: 3, done.<br \/>\nremote: Compressing objects: 100% (2\/2), done.<br \/>\nremote: Total 3 (delta 0), reused 0 (delta 0)<br \/>\nUnpacking objects: 100% (3\/3), done.<br \/>\nFrom https:\/\/bitbucket.org\/username\/test<br \/>\n4754cf1..f75253f master -&gt; origin\/master<br \/>\nAuto-merging index.php<br \/>\nCONFLICT (content): Merge conflict in index.php<br \/>\nAutomatic merge failed; fix conflicts and then commit the result.<br \/>\n[\/sql]<br \/>\nindex.php\u3067\u7af6\u5408\u304c\u767a\u751f\u3057\u3066\u308b\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u3002<br \/>\n\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u7af6\u5408\u3057\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3068\u7af6\u5408\u7b87\u6240\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/tetraup.com\/feed\/wp-content\/uploads\/2018\/03\/img_4-1.png\" alt=\"\u753b\u50cf\" \/><br \/>\n\u4eca\u56de\u306fUser2\u306e\u5909\u66f4\u5185\u5bb9\u3067\u7af6\u5408\u3092\u89e3\u6c7a\u3059\u308b\u3002<br \/>\n\u30d4\u30f3\u30af\u8272\u306eUse me\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u3001\u7af6\u5408\u3092\u89e3\u6c7a\u3057\u518d\u3073\u5bfe\u8c61\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u306b\u8ffd\u52a0\u3057\u3001\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u7af6\u5408\u89e3\u6c7a\u3057\u305f\u3053\u3068\u304c\u308f\u304b\u308b\u3088\u3046\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5165\u529b\u3057\u3001\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002<br \/>\n[sql]<br \/>\ngit add index.php<br \/>\ngit commit -m &#8216;\u7af6\u5408\u3092\u89e3\u6c7a&#8217;<br \/>\ngit push<br \/>\n[\/sql]<br \/>\nUser1\u306eSourceTree\u3067\u30d7\u30eb\u3092\u3057\u3066\u5909\u66f4\u3092\u78ba\u8a8d\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/tetraup.com\/feed\/wp-content\/uploads\/2018\/03\/img_5-4.png\" alt=\"\u753b\u50cf\" \/><br \/>\nUser1\u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306eindex.php<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/tetraup.com\/feed\/wp-content\/uploads\/2018\/03\/img_6-1.png\" alt=\"\u753b\u50cf\" \/><\/p>\n<h2>\u6700\u5f8c\u306b<\/h2>\n<p>\u4eca\u56de\u306f\u7af6\u5408\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u305f\u3002<br \/>\n\u6b21\u56de\u306fSourceTree\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u4eca\u56de\u306f\u7af6\u5408\u306e\u89e3\u6c7a\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002 \u524d\u56de\u307e\u3067\u306e\u8a18\u4e8b\u306f\u3053\u3061\u3089 \u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3082\u77e5\u3089\u306a\u3044\u3068\u30e4\u30d0\u30a4Git Part1 \u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3082\u77e5\u3089\u306a\u3044\u3068\u30e4\u30d0\u30a4Git Part2 \u7af6\u5408\u306e\u767a\u751f \u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":9285,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[37],"tags":[101],"class_list":["post-6881","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-column","tag-beginner"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/posts\/6881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/comments?post=6881"}],"version-history":[{"count":3,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/posts\/6881\/revisions"}],"predecessor-version":[{"id":9286,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/posts\/6881\/revisions\/9286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/media\/9285"}],"wp:attachment":[{"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/media?parent=6881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/categories?post=6881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/tags?post=6881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}