{"id":330,"date":"2009-02-17T20:47:11","date_gmt":"2009-02-17T18:47:11","guid":{"rendered":"http:\/\/www.lucas-nussbaum.net\/blog\/?p=330"},"modified":"2009-02-17T20:47:21","modified_gmt":"2009-02-17T18:47:21","slug":"re-git-sucks","status":"publish","type":"post","link":"https:\/\/www.lucas-nussbaum.net\/blog\/?p=330","title":{"rendered":"Re: GIT sucks"},"content":{"rendered":"<p>Scott has several posts about git (<a href=\"http:\/\/www.netsplit.com\/2009\/02\/17\/git-sucks\/\">1<\/a>, <a href=\"http:\/\/www.netsplit.com\/2009\/02\/17\/git-sucks-2\/\">2<\/a>, <a href=\"http:\/\/www.netsplit.com\/2009\/02\/17\/git-sucks-3\/\">3<\/a>), and the &#8220;I worked on this locally, now I want to push this to a remote place where others will be able to fetch it&#8221;.<\/p>\n<p>I&#8217;ve been using the following snippet for that. YMMV.<br \/>\n<code><br \/>\nREPO=reponame<br \/>\nROOT=\/wheremygitreposare\/<br \/>\nSERV=remoteserver<br \/>\ngit clone --bare . \/tmp\/${REPO}.git && \\<br \/>\nrsync -avzP \/tmp\/${REPO}.git ${SERV}:$ROOT && \\<br \/>\ngit remote add origin ${SERV}:${ROOT}${REPO}.git && \\<br \/>\ngit config branch.master.remote origin && \\<br \/>\ngit config branch.master.merge refs\/heads\/master<\/code><\/p>\n<p>(Please post comments if you can improve it!)<br \/>\nBut I totally agree that this common use case is not well addressed in git.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scott has several posts about git (1, 2, 3), and the &#8220;I worked on this locally, now I want to push this to a remote place where others will be able to fetch it&#8221;. I&#8217;ve been using the following snippet for that. YMMV. REPO=reponame ROOT=\/wheremygitreposare\/ SERV=remoteserver git clone &#8211;bare . \/tmp\/${REPO}.git &#038;&#038; \\ rsync -avzP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"0","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,12],"tags":[],"class_list":["post-330","post","type-post","status-publish","format-standard","hentry","category-planetdebian","category-planetubuntu"],"_links":{"self":[{"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=330"}],"version-history":[{"count":0,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/330\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}