{"id":246,"date":"2016-09-17T04:04:26","date_gmt":"2016-09-17T03:04:26","guid":{"rendered":"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=246"},"modified":"2016-09-17T04:04:26","modified_gmt":"2016-09-17T03:04:26","slug":"remote-git-from-windows","status":"publish","type":"post","link":"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=246","title":{"rendered":"Remote git from Windows"},"content":{"rendered":"<p>To push your latest code ejaculations to a remote repository, e.g. for making it available via cgit:<\/p>\n<h6>Create a bare remote repository:<\/h6>\n<pre>$ cd \/path\/to\/repository\r\n$ git init\u00a0--bare<\/pre>\n<h6>Add the remote repository<\/h6>\n<pre>c:\\repo&gt;\u00a0git remote add &lt;name&gt; ssh:\/\/server.tld.domain:\/path\/to\/repository\r\nc:\\repo&gt; git push --set-upstream &lt;name&gt; &lt;branch&gt;<\/pre>\n<p>You must have write permissions on \/path\/to\/repository, and you have enter the password manually, so do it from cmd.exe. I guess you could setup a windows SSH agent, but I don&#8217;t trust it. Who knows what it sends where&#8230;<\/p>\n<h6>And then&#8230;<\/h6>\n<p>&#8230; it&#8217;s just as easy as:<\/p>\n<pre>c:\\repo&gt; git push<\/pre>\n<p>That&#8217;s all, folks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To push your latest code ejaculations to a remote repository, e.g. for making it available via cgit: Create a bare remote repository: $ cd \/path\/to\/repository $ git init\u00a0&#8211;bare Add the remote repository c:\\repo&gt;\u00a0git remote add &lt;name&gt; ssh:\/\/server.tld.domain:\/path\/to\/repository c:\\repo&gt; git push &#8211;set-upstream &lt;name&gt; &lt;branch&gt; You must have write permissions on \/path\/to\/repository, and you have enter the &hellip; <a href=\"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=246\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Remote git from Windows<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[63,62],"class_list":["post-246","post","type-post","status-publish","format-standard","hentry","category-windows","tag-devel","tag-git"],"_links":{"self":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=246"}],"version-history":[{"count":1,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/246\/revisions"}],"predecessor-version":[{"id":247,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/246\/revisions\/247"}],"wp:attachment":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}