{"id":505,"date":"2026-07-08T16:52:04","date_gmt":"2026-07-08T07:52:04","guid":{"rendered":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/505"},"modified":"2026-07-08T16:52:04","modified_gmt":"2026-07-08T07:52:04","slug":"git%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e5%85%a5%e9%96%80-%e5%9f%ba%e6%9c%ac%e3%81%8b%e3%82%89%e4%be%bf%e5%88%a9%e3%81%aa%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%be%e3%81%a7","status":"publish","type":"post","link":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/505","title":{"rendered":"Git\u30b3\u30de\u30f3\u30c9\u5165\u9580: \u57fa\u672c\u304b\u3089\u4fbf\u5229\u306a\u4f7f\u3044\u65b9\u307e\u3067"},"content":{"rendered":"<h2>Git\u306e\u57fa\u672c\u6982\u5ff5<\/h2>\n<p>Git\u306f\u5206\u6563\u578b\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3067\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u3067\u5e83\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u4ee3\u8868\u7684\u306agit\u30b3\u30de\u30f3\u30c9<\/h2>\n<h3>\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4f5c\u6210\u3068\u30af\u30ed\u30fc\u30f3<\/h3>\n<ul>\n<li><strong>git init<\/strong> &#8211; \u7a7a\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210<\/li>\n<li><strong>git clone<\/strong> &#8211; \u65e2\u5b58\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30ed\u30fc\u30ab\u30eb\u306b\u30b3\u30d4\u30fc<\/li>\n<\/ul>\n<h3>\u5909\u66f4\u306e\u8ffd\u8de1<\/h3>\n<ul>\n<li><strong>git status<\/strong> &#8211; \u4f5c\u696d\u30c4\u30ea\u30fc\u306e\u72b6\u614b\u3092\u8868\u793a<\/li>\n<li><strong>git add<\/strong> &#8211; \u5909\u66f4\u3092\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u30a8\u30ea\u30a2\u306b\u8ffd\u52a0<\/li>\n<li><strong>git commit<\/strong> &#8211; \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u3055\u308c\u305f\u5909\u66f4\u3092\u30b3\u30df\u30c3\u30c8<\/li>\n<\/ul>\n<pre><code>git add .\ngit commit -m \"\u521d\u56de\u30b3\u30df\u30c3\u30c8\"<\/code><\/pre>\n<h3>\u30d6\u30e9\u30f3\u30c1\u64cd\u4f5c<\/h3>\n<ul>\n<li><strong>git branch<\/strong> &#8211; \u30d6\u30e9\u30f3\u30c1\u4e00\u89a7\u3068\u4f5c\u6210<\/li>\n<li><strong>git checkout<\/strong> &#8211; \u30d6\u30e9\u30f3\u30c1\u306e\u5207\u308a\u66ff\u3048<\/li>\n<li><strong>git merge<\/strong> &#8211; \u30d6\u30e9\u30f3\u30c1\u306e\u7d71\u5408<\/li>\n<\/ul>\n<pre><code># \u65b0\u3057\u3044\u30d6\u30e9\u30f3\u30c1\u3092\u4f5c\u6210\u3057\u3066\u5207\u308a\u66ff\u3048\ngit checkout -b feature\/login\n\n# main\u30d6\u30e9\u30f3\u30c1\u3078\u30de\u30fc\u30b8\ngit checkout main\ngit merge feature\/login<\/code><\/pre>\n<h3>\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u306e\u9023\u643a<\/h3>\n<ul>\n<li><strong>git remote<\/strong> &#8211; \u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u7ba1\u7406<\/li>\n<li><strong>git fetch<\/strong> &#8211; \u30ea\u30e2\u30fc\u30c8\u306e\u5909\u66f4\u3092\u53d6\u5f97<\/li>\n<li><strong>git pull<\/strong> &#8211; fetch + merge<\/li>\n<li><strong>git push<\/strong> &#8211; \u30ed\u30fc\u30ab\u30eb\u306e\u30b3\u30df\u30c3\u30c8\u3092\u30ea\u30e2\u30fc\u30c8\u3078\u9001\u4fe1<\/li>\n<\/ul>\n<pre><code>git remote add origin https:\/\/github.com\/user\/repo.git\ngit push -u origin main<\/code><\/pre>\n<h2>\u4fbf\u5229\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u30b3\u30c4<\/h2>\n<ul>\n<li><strong>-am<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u3067 <code>git commit -am \"\u30e1\u30c3\u30bb\u30fc\u30b8\"<\/code> \u306f\u5909\u66f4\u6e08\u307f\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u3067\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0<\/li>\n<li><strong>&#8211;rebase<\/strong> \u3092\u4f7f\u3046\u3068 <code>git pull --rebase<\/code> \u3067\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u3092\u6e1b\u3089\u305b\u308b<\/li>\n<li><strong>git log &#8211;oneline &#8211;graph &#8211;decorate<\/strong> \u3067\u8996\u899a\u7684\u306b\u5c65\u6b74\u3092\u78ba\u8a8d<\/li>\n<\/ul>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Git\u306e\u57fa\u672c\u30b3\u30de\u30f3\u30c9\u3092\u899a\u3048\u308b\u3053\u3068\u3067\u3001\u30b3\u30fc\u30c9\u7ba1\u7406\u304c\u683c\u6bb5\u306b\u697d\u306b\u306a\u308a\u307e\u3059\u3002\u5b9f\u969b\u306b\u4f7f\u3044\u306a\u304c\u3089\u3001\u30d6\u30e9\u30f3\u30c1\u6226\u7565\u3084\u30ea\u30d9\u30fc\u30b9\u306a\u3069\u9ad8\u5ea6\u306a\u6a5f\u80fd\u306b\u3082\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Git\u306e\u57fa\u672c\u6982\u5ff5 Git\u306f\u5206\u6563\u578b\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3067\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u3067\u5e83\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4ee3\u8868\u7684\u306agit\u30b3\u30de\u30f3\u30c9 \u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4f5c\u6210\u3068\u30af\u30ed\u30fc\u30f3 git init &#8211; \u7a7a\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210 git cl [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-505","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/comments?post=505"}],"version-history":[{"count":0,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/505\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/media?parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/categories?post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/tags?post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}