{"id":1508,"date":"2021-06-03T13:51:16","date_gmt":"2021-06-03T04:51:16","guid":{"rendered":"http:\/\/wp.ultimai.org\/wp\/?p=1508"},"modified":"2025-01-10T09:51:25","modified_gmt":"2025-01-10T00:51:25","slug":"post-1508","status":"publish","type":"post","link":"https:\/\/wp.ultimai.org\/?p=1508","title":{"rendered":"Github\u3067\u65b0\u898f\u30ea\u30dd\u30b8\u30c8\u30ea\u306bpush"},"content":{"rendered":"<section>\n<ul>\n<li>\u30b3\u30df\u30c3\u30c8\u3057\u305f\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066init\u3059\u308b<br \/>\n<input class=\"tarminal-copy\" value=\"cd \/var\/www\/html\/\u30b3\u30df\u30c3\u30c8\u3057\u305f\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\" > <br \/>\n<input class=\"tarminal-copy\" value=\"git init\" ><\/p>\n<pre class=\"tarminal\"> \t\t  \r\n   Initialized empty Git repository in \/path\/to\/already\/.git\/  \r\n<\/pre>\n<\/li>\n<li>\u65b0\u898f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306a\u3089,\u307e\u305a\u306f\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<br \/>\n\t<input class=\"tarminal-copy\" value=\"git config --global user.name \u3042\u306a\u305f\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\" > <br \/>\n\t<input class=\"tarminal-copy\" value=\"git config --global user.email \u3042\u306a\u305f\u306e\u30e1\u30a2\u30c9\" > <\/p>\n<li>\u9664\u5916\u30c7\u30a3\u30ec\u30af\u30c8\u30ea \u2192 git\u3078pushu\u3057\u306a\u3044<br \/>\n  <a href=\"https:\/\/www-creators.com\/archives\/1662\">.gitignore \u306e\u66f8\u304d\u65b9\u3002\u30d5\u30a1\u30a4\u30eb\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u9664\u5916<\/a><\/p>\n<li>github\u4e0a\u3067\u65b0\u898f\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210( \u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u540d\u524d\u306f \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u540d\u524d\u306b\u3059\u308b)\n<li><a href=\"https:\/\/docs.github.com\/ja\/repositories\/creating-and-managing-repositories\/creating-a-new-repository\"><br \/>\ngithub\u306e\u30b5\u30a4\u30c8\u5074\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u308b <\/a><\/p>\n<li>\u30ed\u30fc\u30ab\u30eb\u306b\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u60c5\u5831\u3092\u8ffd\u52a0 (\u30b5\u30a4\u30c8\u304b\u3089\u30b3\u30d4\u30da\u3067\u304d\u308b)<br \/>\n <input class=\"tarminal-copy\" value=\"git remote add origin https:\/\/github.com\/\u30a2\u30ab\u30a6\u30f3\u30c8\u540d\/\u30ea\u30dd\u30b8\u30c8\u30ea\u540d.git\">\n<\/li>\n<li>\u30b9\u30c6\u30fc\u30b8\u3059\u308b  \u6700\u5f8c\u306e \u30c9\u30c3\u30c8\u306f \u3059\u3079\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u610f\u5473(\u521d\u56de\u306a\u306e\u3067\u3053\u308c\u3067\u3044\u3044)<br \/>\n   <input class=\"tarminal-copy\" value=\"git add . \" >\n<\/li>\n<li>\u30b3\u30df\u30c3\u30c8\u3059\u308b Who aer You ? \u3068\u805e\u304b\u308c\u305f\u3089 \u30e1\u30a2\u30c9\u3068\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u3001\u753b\u9762\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u901a\u308a\u306b\u5165\u308c\u3066\u5b9f\u884c<br \/>\n\t<input class=\"tarminal-copy\" value=\"git commit -m 'initial commit'\" >\n<\/li>\n<li>\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u6709\u308b\u306a\u3089\u3053\u308c\u3067Push<br \/>\n\t<input class=\"tarminal-copy\" value=\"git push origin master\"><br \/>\n\t-f  \u3067\u5f37\u5236<br \/>\n<\/section>\n<p><\/p>\n<hr>\n<section>\n<h3 id=\"clone\">Git \u65b0\u898f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30ea\u30e2\u30fc\u30c8\u304b\u3089 pull\u3057\u305f\u3044<\/h3>\n<li>\u65b0\u898f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306a\u3089,\u307e\u305a\u306f\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<br \/>\n\t<input class=\"tarminal-copy\" value=\"git config --global user.name youeGitAccount\" > <br \/>\n\t<input class=\"tarminal-copy\" value=\"git config --global user.email youeGit@mail.com\" > <br \/>\n\u89aa\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u307e\u3067\u79fb\u52d5<br \/>\n\t<input class=\"tarminal-copy\" value=\"cd \/var\/www\/html\/\u3069\u3053\u304b\" > <\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u3044 \u30ea\u30dd\u30b8\u30c8\u30ea\u6307\u5b9a<br \/>\n\t<input class=\"tarminal-copy\" value=\"git clone https:\/\/github.com\/youeGitAccount\/\u30ea\u30dd\u30b8\u30c8\u30ea\u540d.git\" > <\/p>\n<p>git pull\u30ea\u30e2\u30fc\u30c8\u30ec\u30dd\u30b8\u30c8\u30ea\u3068\u30ed\u30fc\u30ab\u30eb\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u540c\u3058\u72b6\u614b\u306b\u3059\u308b<br \/>\n\t<input class=\"tarminal-copy\" value=\"git pull origin master\" > <br \/>\n<\/section>\n<section>\n<h3>\u9375\u8a8d\u8a3c(push\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u805e\u304b\u308c\u306a\u3044\u3088\u3046)\u306b\u3059\u308b<\/h3>\n<ul>\n<li>\u30ed\u30fc\u30ab\u30eb\u306e\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u3067\u9375\u3092\u3064\u304f\u308b(\u540d\u524d\u306f\u6307\u5b9a\u3057\u305f\u307b\u3046\u304c\u3044\u3044)<br \/>\n       <input class=\"tarminal-copy\" value=\"vi ~\/.ssh\/github_rsa\">\n      <\/li>\n<li>\n        config \u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<br \/>\n        <input class=\"tarminal-copy\" value=\"vi ~\/.ssh\/config\"><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\n          Host github github.com\r\n          HostName github.com\r\n          IdentityFile ~\/.ssh\/github_rsa\r\n          User git \r\n        <\/pre>\n<\/li>\n<li>600\u306b\u3059\u308b<br \/>\n      <input class=\"tarminal-copy\" value=\"sudo chmod 600 config\"><br \/>\n      <input class=\"tarminal-copy\" value=\"sudo chmod 600 github_rsa\">\n    <\/li>\n<li>\n      .gitconfig \u3092\u3064\u304f\u3063\u3066 600\u306b\u3059\u308b<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\n  vi ~\/.gitconfig \r\n   [user]\r\n        name = \u30a2\u30ab\u30a6\u30f3\u30c8\r\n        email = \u30e1\u30a2\u30c9\r\n\r\n   [url \"github:\"]\r\n      InsteadOf = https:\/\/github.com\/\r\n      InsteadOf = git@github.com:\r\n     <\/pre>\n<\/li>\n<li>\n      github\u306b\u79fb\u52d5\u3057\u3001\u30de\u30a4\u30da\u30fc\u30b8\u306epersonal settings\u306eSSH and GPG keys\u306b\u5165\u308a\u307e\u3059\u3002<br \/>\n      New SSH key\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u3055\u304d\u307b\u3069\u30b3\u30d4\u30fc\u3057\u305f\u516c\u958b\u9375\u3092\u30da\u30fc\u30b9\u30c8\u3057\u307e\u3059\u3002\n    <\/li>\n<\/ul>\n<\/section>\n<h4>\u8ffd\u8de1\u6e08\u307f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u9664\u5916\u3059\u308b\u65b9\u6cd5<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\n # \u30d5\u30a1\u30a4\u30eb\u306f\u6d88\u3055\u305a\u306b\u3001\u8ffd\u8de1\u3060\u3051\u9664\u5916\r\n $ git rm --cached FILE_NAME\r\n<\/pre>\n<h4><a href=\"https:\/\/qiita.com\/ponsuke0531\/items\/1e0ab0d6845ec93a0dc0\">Git\u306e\u4e00\u90e8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3060\u3051\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/a><\/h4>\n<p>\u6b21\u306b marge request (github\u3067)<\/p>\n<p>\u4ed6\u306e\u4eba\u306e\u958b\u767a\u5206\u3092\u53d6\u308a\u8fbc\u3080<br \/>\ngit pull origin master<\/p>\n<p>\u76f4\u524d\u30b3\u30df\u30c3\u30c8\u306e\u53d6\u308a\u6d88\u3057\u3002<br \/>\ngit reset HEAD<\/p>\n<h5><a href=\"https:\/\/mimirswell.ggnet.co.jp\/blog-197\">CentOS7\u3067\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u30d6\u30e9\u30f3\u30c1\u540d\u3092\u8868\u793a\u3057\u305f\u3044<\/a><\/h5>\n","protected":false},"excerpt":{"rendered":"<p>\u30b3\u30df\u30c3\u30c8\u3057\u305f\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066init\u3059\u308b  [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[37],"class_list":["post-1508","post","type-post","status-publish","format-standard","hentry","category-linux","tag-wsl"],"_links":{"self":[{"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/1508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1508"}],"version-history":[{"count":5,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/1508\/revisions"}],"predecessor-version":[{"id":2320,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/1508\/revisions\/2320"}],"wp:attachment":[{"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}