{"id":2162,"date":"2015-07-06T12:21:45","date_gmt":"2015-07-06T08:21:45","guid":{"rendered":"http:\/\/sandalov.org\/blog\/?p=2162"},"modified":"2015-07-06T12:21:45","modified_gmt":"2015-07-06T08:21:45","slug":"git-setting-up-a-remote-repository-and-doing-an-initial-push","status":"publish","type":"post","link":"https:\/\/sandalov.org\/blog\/2162\/","title":{"rendered":"Git \u2013 setting up a remote repository and doing an initial push"},"content":{"rendered":"<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>On remote:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nssh git@example.com\r\nmkdir my_project.git\r\ncd my_project.git\r\ngit init --bare\r\ngit update-server-info # If planning to serve via HTTP\r\nexit\r\n<\/pre>\n<p>On local machine:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd my_project\r\ngit init\r\ngit add *\r\ngit commit -m &quot;My initial commit message&quot;\r\ngit remote add origin git@example.com:my_project.git\r\ngit push -u origin master\r\n<\/pre>\n<p>Clone:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ngit clone git@example.com:my_project.git\r\ncd my_project\r\n<\/pre>\n<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>On remote: ssh git@example.com mkdir my_project.git cd my_project.git git init &#8211;bare git update-server-info # If planning to serve via HTTP exit On local machine: cd my_project git init git add * git commit -m &quot;My initial commit message&quot; git remote add origin git@example.com:my_project.git git push -u origin master Clone: git &hellip; <a class=\"continue-reading-link\" href=\"https:\/\/sandalov.org\/blog\/2162\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[376,207,375,377],"class_list":["post-2162","post","type-post","status-publish","format-standard","hentry","category-unsorted","tag-bare","tag-git","tag-init","tag-initial-push"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/2162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/comments?post=2162"}],"version-history":[{"count":1,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/2162\/revisions"}],"predecessor-version":[{"id":2163,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/2162\/revisions\/2163"}],"wp:attachment":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/media?parent=2162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/categories?post=2162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/tags?post=2162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}