{"id":2535,"date":"2018-06-29T00:07:25","date_gmt":"2018-06-28T15:07:25","guid":{"rendered":"https:\/\/www.chihayafuru.jp\/tech\/?p=2535"},"modified":"2024-08-23T11:00:26","modified_gmt":"2024-08-23T02:00:26","slug":"git-%e3%83%81%e3%83%ab%e3%83%80%e3%81%a8%e3%82%ad%e3%83%a3%e3%83%ac%e3%83%83%e3%83%88%e3%81%ae%e9%81%95%e3%81%84","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/2535","title":{"rendered":"[git] \u30c1\u30eb\u30c0(~)\u3068\u30ad\u30e3\u30ec\u30c3\u30c8(^)\u306e\u9055\u3044"},"content":{"rendered":"<h2>\u30c1\u30eb\u30c0 ( &#65374; )<\/h2>\n<div>\n    <img decoding=\"async\" src=\"https:\/\/chihayafuru.s3-ap-northeast-1.amazonaws.com\/imgs\/2021\/02\/git_ancestry_reference-3.png\" alt=\"\u30c1\u30eb\u30c0\">\n<\/div>\n<ul>\n<li><strong>HEAD&tilde;<\/strong> : HEAD\u306e\u89aa\uff08\uff11\u4e16\u4ee3\u524d\uff09<\/li>\n<li><strong>HEAD&tilde;&tilde;<\/strong> : HEAD\u306e\u89aa\u306e\u89aa\uff08\uff12\u4e16\u4ee3\u524d\uff09<\/li>\n<li><strong>HEAD&tilde;2<\/strong> : HEAD\u306e\u89aa\u306e\u89aa\uff08\uff12\u4e16\u4ee3\u524d\uff09<\/li>\n<\/ul>\n<p>\uff11\u756a\u76ee\u306e\u89aa\u3092\u6697\u9ed9\u7684\u306b\u9061\u308b\u3002\u89aa\u304c\u4e00\u3064(merge commit\u304c\u306a\u3044)\u306e\u3068\u304d\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u6307\u5b9a\u3067\u304d\u308b\u3002 <code>HEAD&tilde;&tilde;<\/code> \u3068 <code>HEAD&tilde;2<\/code> \u306f\uff08\u8a18\u6cd5\u306e\u9055\u3044\u3060\u3051\u3067\uff09\u300e\u540c\u3058\u30b3\u30df\u30c3\u30c8\u300f\u3092\u6307\u3059\u3002\u30c1\u30eb\u30c0\u306e\u76f4\u5f8c\u306b\u7d9a\u304f\u6570\u5b57\u306f\u9061\u308b\u4e16\u4ee3\u6570\u3092\u6307\u5b9a\u3059\u308b\u3002\u3057\u305f\u304c\u3063\u3066\u30c1\u30eb\u30c0\u306e\u5f8c\u308d\u306b\u7d9a\u304f\u6570\u5b57\u306f2\u4ee5\u4e0a\u306e\u6570\u304c\u8a31\u3055\u308c\u308b\u3002<\/p>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<h2>\u30ad\u30e3\u30ec\u30c3\u30c8 ( &Hat; )<\/h2>\n<div>\n    <img decoding=\"async\" src=\"https:\/\/chihayafuru.s3-ap-northeast-1.amazonaws.com\/imgs\/2021\/02\/git_ancestry_reference-4.png\" alt=\"\u30ad\u30e3\u30ec\u30c3\u30c8\">\n<\/div>\n<ul>\n<li><strong>HEAD^<\/strong> : HEAD\u306e\uff11\u756a\u76ee\u306e\u89aa\uff08\uff11\u4e16\u4ee3\u524d\uff09<\/li>\n<li><strong>HEAD^2<\/strong> : HEAD\u306e\uff12\u756a\u76ee\u306e\u89aa\uff08\uff11\u4e16\u4ee3\u524d\uff09<\/li>\n<li><strong>HEAD^^<\/strong> : HEAD\u306e\uff11\u756a\u76ee\u306e\u89aa\u306e\uff11\u756a\u76ee\u306e\u89aa\uff08\uff12\u4e16\u4ee3\u524d\uff09<\/li>\n<li><strong>HEAD^2^<\/strong> : HEAD\u306e\uff12\u756a\u76ee\u306e\u89aa\u306e\uff11\u756a\u76ee\u306e\u89aa\uff08\uff12\u4e16\u4ee3\u524d\uff09<\/li>\n<li><strong>HEAD^2^2<\/strong> : HEAD\u306e\uff12\u756a\u76ee\u306e\u89aa\u306e\uff12\u756a\u76ee\u306e\u89aa\uff08\uff12\u4e16\u4ee3\u524d\uff09<\/li>\n<\/ul>\n<p>\u89aa\u30b3\u30df\u30c3\u30c8\u304c\uff12\u3064(merge commit\u304c\u3042\u308b)\u3068\u304d\u306b\u533a\u5225\u3067\u304d\u308b\u3002\u30ad\u30e3\u30ec\u30c3\u30c8\u306e\u76f4\u5f8c\u306b\u7d9a\u304f\u6570\u5b57\u306f\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u306b\u304a\u3051\u308b\uff11\u756a\u76ee\u306e\u89aa(first parent)\u304b\uff12\u756a\u76ee\u306e\u89aa(secound parent)\u304b\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u308b\u3002\u3057\u305f\u304c\u3063\u3066\u30ad\u30e3\u30ec\u30c3\u30c8\u306e\u76f4\u5f8c\u306b\uff12\u3092\u8d85\u3048\u308b\u6570\u5b57\u304c\u7d9a\u304f\u3053\u3068\u306f\u306a\u3044\u3002<strong>HEAD^^<\/strong> \u3068 <strong>HEAD^2<\/strong> \u306f\u4e16\u4ee3\u3082\u30d6\u30e9\u30f3\u30c1\u3082\u300e\u7570\u306a\u308b\u30b3\u30df\u30c3\u30c8\u300f\u3092\u6307\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\uff11\u756a\u76ee\u306e\u89aa\u3068\uff12\u756a\u76ee\u306e\u89aa\u304c\u3042\u308b\uff08merge commit\u304c\u3042\u308b\uff09\u3068\u304d\u306egit log\u306e\u4f8b<\/h2>\n<pre class=\"lang:default highlight:0 decode:true \" >commit 09f0fcf0c96661a87bba7bed8b90db87121d3015 (HEAD -&gt; develop)\r\nMerge: 36fc76d 3ad88d7\r\nAuthor: Jane Doe &lt;anonymous@example.com&gt;\r\nDate:   Thu Jun 21 18:37:35 2018 +0900<\/pre>\n<p><strong>36fc76d<\/strong> \u3068 <strong>3ad88d7<\/strong> \u306e\uff12\u3064\u306e\u30b3\u30df\u30c3\u30c8\uff08\u30d6\u30e9\u30f3\u30c1\uff09\u3092\u89aa\u306b\u30de\u30fc\u30b8\u3057\u3066\u3044\u308b\u3002 <\/p>\n<p>&nbsp;<\/p>\n<h2>\u5bb6\u7cfb\u53c2\u7167(Ancestry Reference)\u306e\u4f8b<\/h2>\n<div>\n    <img decoding=\"async\" src=\"https:\/\/chihayafuru.s3-ap-northeast-1.amazonaws.com\/imgs\/2021\/02\/git_ancestry_reference-1.png\" alt=\"\u7cfb\u8b5c\u53c2\u7167\u306e\u4f8b\uff11\">\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n    <img decoding=\"async\" src=\"https:\/\/chihayafuru.s3-ap-northeast-1.amazonaws.com\/imgs\/2021\/02\/git_ancestry_reference-2.png\" alt=\"\u7cfb\u8b5c\u53c2\u7167\u306e\u4f8b\uff12\">\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u30ad\u30e3\u30ec\u30c3\u30c8\u3068\u30c1\u30eb\u30c0\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u300e\u7570\u306a\u308b\u8a18\u8ff0\u65b9\u6cd5\u300f\u304c\u300e\u540c\u3058\u30b3\u30df\u30c3\u30c8\u300f\u3092\u6307\u3059\u3053\u3068\u304c\u3042\u308b\u3002\u305f\u3060\u3057\u3001\u305d\u308c\u306f\u540c\u3058\u5bb6\u7cfb\uff08\u5206\u5c90\u3068\u30de\u30fc\u30b8\u3067\u4f5c\u3089\u308c\u308b\u30b3\u30df\u30c3\u30c8\u6b74\u53f2\uff09\u3092\u8fbf\u3063\u3066\u3044\u308b\u3068\u304d\u306b\u3001\u305f\u307e\u305f\u307e\u540c\u3058\u30b3\u30df\u30c3\u30c8\u3092\u6307\u3057\u3066\u3044\u308b\u306e\u3067\u3042\u3063\u3066\u300e\u7570\u306a\u308b\u8a18\u8ff0\u300f\u306f\u300e\u7570\u306a\u308b\u30b3\u30df\u30c3\u30c8\u300f\u3092\u6307\u3059\u3068\u8003\u3048\u308b\u3079\u304d\u3067\u3042\u308b\u3002\u3064\u307e\u308a\u306f\u30ad\u30e3\u30ec\u30c3\u30c8\u3068\u30c1\u30eb\u30c0\u306e\u8a18\u8ff0\u65b9\u6cd5\u306e\u9055\u3044\u306f\u81e8\u6a5f\u5fdc\u5909\u306b\u4f7f\u3044\u5206\u3051\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u304c\u5b58\u5728\u3057\u306a\u3051\u308c\u3070\u300c\u30c1\u30eb\u30c0\u300d\u3067\u8a18\u8ff0\u3057\u3066\u3082\u300c\u30ad\u30e3\u30ec\u30c3\u30c8\u300d\u3067\u8a18\u8ff0\u3057\u3066\u3082\u5e38\u306b\u540c\u3058\u30b3\u30df\u30c3\u30c8\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u3057\u3066\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u304c\u5b58\u5728\u3057\u306a\u3044\u306b\u3082\u304b\u304b\u308f\u3089\u305a <code>HEAD^2<\/code> \u306e\u3088\u3046\u306b\uff12\u756a\u76ee\u306e\u89aa\u3092\u3057\u3066\u3044\u3059\u308b\u8a18\u8ff0\u3092\u3059\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u304c\u5b58\u5728\u3057\u306a\u3044\u3068\u304d\u306f\u3001\u30c1\u30eb\u30c0\u3068\u30ad\u30e3\u30ec\u30c3\u30c8\u306e\u4f7f\u3044\u5206\u3051\u306b\u795e\u7d4c\u8cea\u306b\u306a\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u304c\u5b58\u5728\u3057\u306a\u3044\u3001\u3082\u3057\u304f\u306f\uff12\u756a\u76ee\u306e\u89aa\u3092\u8fbf\u3089\u306a\u3044\u306e\u3067\u3042\u308c\u3070\u300c\u30c1\u30eb\u30c0\u300d\u3067\u8a18\u8ff0\u3092\u7d71\u4e00\u3059\u308b\u306e\u304c\u30b7\u30f3\u30d7\u30eb\u306a\u8a18\u8ff0\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>Git \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/h2>\n<ul>\n<li><a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Git-Tools-Revision-Selection#_ancestry_references\">Revision Selection : Ancestry References<\/a><\/li>\n<li><a href=\"https:\/\/git-scm.com\/book\/ja\/v2\/Git-%E3%81%AE%E3%81%95%E3%81%BE%E3%81%96%E3%81%BE%E3%81%AA%E3%83%84%E3%83%BC%E3%83%AB-%E3%83%AA%E3%83%93%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%AE%E9%81%B8%E6%8A%9E#_%E5%AE%B6%E7%B3%BB%E3%81%AE%E5%8F%82%E7%85%A7\">\u30ea\u30d3\u30b8\u30e7\u30f3\u306e\u9078\u629e : \u5bb6\u7cfb\u306e\u53c2\u7167<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u30c1\u30eb\u30c0 ( &#65374; ) HEAD&tilde; : HEAD\u306e\u89aa\uff08\uff11\u4e16\u4ee3\u524d\uff09 HEAD&tilde;&tilde; : HEAD\u306e\u89aa\u306e\u89aa\uff08\uff12\u4e16\u4ee3\u524d\uff09 HEAD&tilde;2 : HEAD\u306e\u89aa\u306e\u89aa\uff08\uff12\u4e16\u4ee3\u524d\uff09  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[2],"class_list":["post-2535","post","type-post","status-publish","format-standard","hentry","category-memo","tag-git"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/2535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=2535"}],"version-history":[{"count":25,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/2535\/revisions"}],"predecessor-version":[{"id":7146,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/2535\/revisions\/7146"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=2535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=2535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=2535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}