{"id":1277,"date":"2014-12-07T23:16:29","date_gmt":"2014-12-07T14:16:29","guid":{"rendered":"http:\/\/tech.akat.info\/?p=1277"},"modified":"2014-12-08T00:46:29","modified_gmt":"2014-12-07T15:46:29","slug":"github%e3%81%a8git","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=1277","title":{"rendered":"GitHub\u3068Git"},"content":{"rendered":"<p>\u300cGitHub\u5b9f\u8df5\u5165\u9580\u300d\u3092\u8cfc\u5165\u3057\u305f\u3001\u3044\u308d\u3044\u308d\u3084\u3063\u3066\u307f\u305f\u3053\u3068\u306e\u307e\u3068\u3081<\/p>\n<h1>GitHub\u30e1\u30ea\u30c3\u30c8<\/h1>\n<p>\u30fb\u30bf\u30b9\u30af\u7ba1\u7406\u3084\u30d0\u30b0\u5831\u544a\u3092Issue\u3092\u5229\u7528\u3057\u3066\u3084\u308a\u3068\u308a\u3067\u304d\u308b<br \/>\n\u30fbPull Request(Git\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u3001\u5909\u66f4\u3057\u305f\u30bd\u30fc\u30b9\u3092\u8ffd\u52a0\u3059\u308b\u3088\u3046\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u3053\u3068)\u304c\u5229\u7528\u3067\u304d\u308b<br \/>\n\u30fbOSS\u306fGitHub\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u591a\u304f\u3001\u4ed6\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3082\u53c2\u753b\u3057\u3084\u3059\u304f\u306a\u308b<\/p>\n<h1>Git\u306b\u3064\u3044\u3066<\/h1>\n<p>Linux\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u7ba1\u7406\u306e\u305f\u3081\u306b\u958b\u767a\u3055\u308c\u305f<br \/>\n\u5206\u6563\u578b\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0<br \/>\n\u96c6\u4e2d\u578b:\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30b5\u30fc\u30d0\u306b\u96c6\u4e2d\u3055\u305b\u3066\u914d\u7f6e\u3059\u308b\u3001\u305d\u306e\u305f\u3081\u30ea\u30dd\u30b8\u30c8\u30ea\u306f1\u3064\u3060\u3051\u3002\u30b5\u30fc\u30d0\u306b\u7e4b\u304c\u3089\u306a\u3051\u308c\u3070\u4f55\u3082\u3067\u304d\u305a\u3001\u7af6\u5408\u304c\u767a\u751f\u3057\u3084\u3059\u3044<br \/>\n\u5206\u6563\u578b:\u30e6\u30fc\u30b6\u3054\u3068\u306b\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u914d\u7f6e\u3059\u308b\u3001\u30e6\u30fc\u30b6\u9593\u3067push\u3084pull\u304c\u53ef\u80fd\u3067\u3042\u308a\u3001\u30b5\u30fc\u30d0\u306b\u7e4b\u304c\u3089\u305a\u3068\u3082\u81ea\u7aef\u672b\u3060\u3051\u3067\u4f5c\u696d\u53ef\u80fd<\/p>\n<pre class=\"brush: plain; title: \u521d\u671f\u8a2d\u5b9a; notranslate\" title=\"\u521d\u671f\u8a2d\u5b9a\">\r\nroot@hostname:\/home\/shimizu# git config --global user.name &quot;shimizu hiroaki&quot;\r\nroot@hostname:\/home\/shimizu# git config --global user.email &quot;shimizu.r.hiroaki@gmail.com&quot;\r\n### Git \u304c\u81ea\u52d5\u7684\u306b\u5927\u534a\u306e\u51fa\u529b\u306b\u8272\u3065\u3051\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f ###\r\nroot@hostname:\/home\/shimizu# git config --global color.ui true \r\nroot@hostname:\/home\/shimizu# cat \/root\/.gitconfig \r\n&#x5B;user]\r\n        name = shimizu hiroaki\r\n        email = shimizu.r.hiroaki@gmail.com\r\n&#x5B;color]\r\n        ui = true\r\n<\/pre>\n<h1>GitHub\u5229\u7528\u524d\u306e\u6e96\u5099<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu# ssh-keygen -t rsa -C shimizu.r.hiroaki@gmail.com \r\nGenerating public\/private rsa key pair.\r\nEnter file in which to save the key (\/root\/.ssh\/id_rsa): key\r\nEnter passphrase (empty for no passphrase): \r\nEnter same passphrase again: \r\nYour identification has been saved in key.\r\nYour public key has been saved in key.pub.\r\nThe key fingerprint is:\r\n7a:f0:75:7e:91:84:2a:9b:78:1a:9b:f9:22:44:7e:ef shimizu.r.hiroaki@gmail.com\r\nThe key's randomart image is:\r\n+--&#x5B; RSA 2048]----+\r\n|                 |\r\n|                 |\r\n|           .     |\r\n|          . .    |\r\n|      . S .+..   |\r\n|  .    S .ooo    |\r\n| o      o.  ...  |\r\n|  o o .*o   .. . |\r\n+-----------------+\r\n\r\nroot@hostname:\/home\/shimizu# ssh-add key\r\nIdentity added: key (key)\r\n\r\n### \u4ee5\u4e0b\u3092GitHub\u306b\u767b\u9332\u3059\u308b ###\r\nroot@hostname:\/home\/shimizu# cat key.pub \r\nssh-rsa \r\n...............\r\nshimizu.r.hiroaki@gmail.com\r\n<\/pre>\n<p>GitHub\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u53d6\u5f97\u3057\u3001\u5148\u307b\u3069\u306e\u516c\u958b\u9375\u3092[Add SSH key]\u304b\u3089\u767b\u9332\u3059\u308b<br \/>\n<a href=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/12\/Screenshot-2014-12-07-at-22.58.31.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/12\/Screenshot-2014-12-07-at-22.58.31.png\" alt=\"Screenshot 2014-12-07 at 22.58.31\" width=\"1133\" height=\"421\" class=\"alignnone size-full wp-image-1278\" \/><\/a><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n### GitHub\u3068\u306e\u8a8d\u8a3c\u30c6\u30b9\u30c8 ###\r\nroot@hostname:\/home\/shimizu# ssh -T git@github.com\r\nHi shimizuhiroaki! You've successfully authenticated, but GitHub does not provide shell access.\r\n<\/pre>\n<h1>GitHub\u3092\u4f7f\u3063\u3066\u307f\u308b<\/h1>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b<br \/>\n<a href=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/12\/Screenshot-2014-12-07-at-23.37.35.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/12\/Screenshot-2014-12-07-at-23.37.35.png\" alt=\"Screenshot 2014-12-07 at 23.37.35\" width=\"1051\" height=\"135\" class=\"alignnone size-full wp-image-1283\" \/><\/a><\/p>\n<p>\u7279\u5b9a\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u5229\u7528\u6642\u306f\u3001.gitignore\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u7279\u5b9a\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u304b\u3089\u9664\u304f\u305f\u3081\u4fbf\u5229<br \/>\n<a href=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/12\/Screenshot-2014-12-07-at-23.39.56.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/12\/Screenshot-2014-12-07-at-23.39.56.png\" alt=\"Screenshot 2014-12-07 at 23.39.56\" width=\"960\" height=\"556\" class=\"alignnone size-full wp-image-1284\" \/><\/a><\/p>\n<p>\u30e6\u30fc\u30b6\u540d\/\u30ea\u30dd\u30b8\u30c8\u30ea\u540d\u3000\u3067\u30a2\u30af\u30bb\u30b9\u53ef\u80fd<br \/>\nhttps:\/\/github.com\/shimizuhiroaki\/bash<br \/>\n<a href=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/12\/Screenshot-2014-12-07-at-23.42.47.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/12\/Screenshot-2014-12-07-at-23.42.47.png\" alt=\"Screenshot 2014-12-07 at 23.42.47\" width=\"1101\" height=\"627\" class=\"alignnone size-full wp-image-1286\" \/><\/a><\/p>\n<pre class=\"brush: plain; title: \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u5229\u7528\u3059\u308b; notranslate\" title=\"\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u5229\u7528\u3059\u308b\">\r\nroot@hostname:\/home\/shimizu# mkdir github\r\nroot@hostname:\/home\/shimizu# cd github\/\r\nroot@hostname:\/home\/shimizu\/github# git clone git@github.com:shimizuhiroaki\/bash.git\r\nCloning into 'bash'...\r\nWarning: Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts.\r\nremote: Counting objects: 3, done.\r\nremote: Total 3 (delta 0), reused 0 (delta 0)\r\nReceiving objects: 100% (3\/3), done.\r\nroot@hostname:\/home\/shimizu\/github# cd bash\/\r\nroot@hostname:\/home\/shimizu\/github\/bash# ls -al\r\n\u5408\u8a08 16\r\ndrwxr-xr-x 3 root root 4096 12\u6708  7 23:47 .\r\ndrwxr-xr-x 3 root root 4096 12\u6708  7 23:47 ..\r\ndrwxr-xr-x 8 root root 4096 12\u6708  7 23:47 .git\r\n-rw-r--r-- 1 root root   22 12\u6708  7 23:47 README.md\r\n\r\nroot@hostname:\/home\/shimizu\/github\/bash# touch sample\r\nroot@hostname:\/home\/shimizu\/github\/bash# git status\r\n# On branch master\r\n# Untracked files:\r\n#   (use &quot;git add &lt;file&gt;...&quot; to include in what will be committed)\r\n#\r\n#       sample\r\nnothing added to commit but untracked files present (use &quot;git add&quot; to track)\r\n### \u30b3\u30df\u30c3\u30c8\u3059\u308b\u524d\u306e\u6e96\u5099\u3002\u30ef\u30fc\u30af\u30c4\u30ea\u30fc\u304b\u3089\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u767b\u9332\u3059\u308b ###\r\n### \u3059\u3079\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u767b\u9332\u3059\u308b\u5834\u5408\u306f git add .###\r\nroot@hostname:\/home\/shimizu\/github\/bash#  sample \r\n### \u30b3\u30df\u30c3\u30c8\u3059\u308b ###\r\nroot@hostname:\/home\/shimizu\/github\/bash# git commit sample -m &quot;add sample file&quot;\r\n&#x5B;master a8c57b9] add sample file\r\n 1 file changed, 1 insertion(+)\r\n create mode 100644 sample\r\n\r\nroot@hostname:\/home\/shimizu\/github\/bash# git log\r\n^&#x5B;&#x5B;33mcommit a8c57b9866e78f3aac4e7429971293a3df4e51ef^&#x5B;&#x5B;m\r\nAuthor: shimizu hiroaki &lt;shimizu.r.hiroaki@gmail.com&gt;\r\nDate:   Sun Dec 7 23:53:08 2014 +0900\r\n\r\n    add sample file\r\n\r\n^&#x5B;&#x5B;33mcommit f2bc27f60188cdd9ba656831b1b623cc8c7477ee^&#x5B;&#x5B;m\r\nAuthor: shimizuhiroaki &lt;shimizu.r.hiroaki@gmail.com&gt;\r\nDate:   Sun Dec 7 23:42:17 2014 +0900\r\n\r\n    Initial commit\r\nroot@hostname:\/home\/shimizu\/github\/bash# git status\r\n# On branch master\r\n# Your branch is ahead of 'origin\/master' by 1 commit.\r\n#\r\nnothing to commit (working directory clean)\r\n\r\n### GitHub\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u767b\u9332\u3059\u308b ###\r\nroot@hostname:\/home\/shimizu\/github\/bash# git push\r\nWarning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.\r\nCounting objects: 4, done.\r\nDelta compression using up to 2 threads.\r\nCompressing objects: 100% (2\/2), done.\r\nWriting objects: 100% (3\/3), 292 bytes, done.\r\nTotal 3 (delta 0), reused 0 (delta 0)\r\nTo git@github.com:shimizuhiroaki\/bash.git\r\n   f2bc27f..a8c57b9  master -&gt; master\r\n<\/pre>\n<h1>\u53c2\u8003URL<\/h1>\n<p>\u5206\u6563\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0Git\u5165\u9580<br \/>\nhttp:\/\/www.itmedia.co.jp\/enterprise\/articles\/0902\/09\/news019.html<br \/>\nitHub\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\uff01\u5c0e\u5165\u3068\u7c21\u5358\u306a\u6d41\u308c\u3001\u3088\u304f\u4f7f\u3046\u30b3\u30de\u30f3\u30c9\u306a\u3069\u3002<br \/>\nhttp:\/\/wp.yat-net.com\/?p=3874<br \/>\n\u30b5\u30eb\u3067\u3082\u308f\u304b\u308bGit\u5165\u9580<br \/>\nhttp:\/\/www.backlog.jp\/git-guide\/intro<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300cGitHub\u5b9f\u8df5\u5165\u9580\u300d\u3092\u8cfc\u5165\u3057\u305f\u3001\u3044\u308d\u3044\u308d\u3084\u3063\u3066\u307f\u305f\u3053\u3068\u306e\u307e\u3068\u3081 GitHub\u30e1\u30ea\u30c3\u30c8 \u30fb\u30bf\u30b9\u30af\u7ba1\u7406\u3084\u30d0\u30b0\u5831\u544a\u3092Issue\u3092\u5229\u7528\u3057\u3066\u3084\u308a\u3068\u308a\u3067\u304d\u308b \u30fbPull Request(Git\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u3001\u5909\u66f4\u3057\u305f\u30bd\u30fc\u30b9\u3092 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1277"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1277"}],"version-history":[{"count":7,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1277\/revisions"}],"predecessor-version":[{"id":1288,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1277\/revisions\/1288"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}