{"thread":{"id":"18263","subject":"How newbies create remote repositories","startedAt":"2009-03-11T06:59:47Z","lastAt":"2009-03-11T06:59:47Z","messageCount":1,"participants":["Bernie Innocenti"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"107650","messageId":"49B76163.2080205@codewiz.org","threadId":"18263","inReplyTo":null,"subject":"How newbies create remote repositories","fromName":"Bernie Innocenti","fromEmail":"bernie@codewiz.org","sentAt":"2009-03-11T06:59:47Z","receivedAt":"2009-03-11T06:59:47Z","isPatch":false,"sender":{"key":"bernie@codewiz.org","avatar":"https://gravatar.com/avatar/42735a3728f3ff3f989a12e9d6931e6e742865fedc6f5eca63cdb327eb820720?d=mp&s=160"},"body":"Here's another usability problem report from my friends who\nare learning their way to Git from previous experience with\nSubversion and Mercurial.\n\nThree of them confessed they couldn't find a simple recipe\nto setup remote repositories, after looking in obvious\nplaces such as the git-push manpage.\n\nEach one could figure it out independently after some time, coming\nup with a variety of creative strategies:\n\nStrategy 1:\n client$ ssh server\n server$ mkdir foo.git\n server$ cd foo.git\n server$ git init --bare --shared\n server$ exit\n client$ git push --mirror server:foo.git \n\nProblem: Does not setup the remote for you.\nSolution: Would be nice if \"git push <URL>\" could give this tip\n\nProblem: Requires a full unrestricted shell on the server\nSolution: If \"git init <dir>\" was supported, one could do\n  ssh server git init --bare --shared foo.git\n\n\nStrategy 2:\n client$ ssh server\n server$ mkdir foo.git\n server$ cd foo.git\n server$ git init --bare --shared\n server$ exit\n client$ git clone server:foo.git .\n client$ git add .\n client$ git commit\n client$ git push\n\nProblem: only works if you had no local repository yet\n\n\nStrategy 3:\n client$ scp -r .git server:foo.git\n client$ cd ..\n client$ rm -r foo\n client$ git clone server:foo.git\n\nProblem: the user checks out the repository from scratch\n  to properly add the remote\nSolution: \"git pull\" might suggest to use \"git remote\".\n\nA simple \"git remote create\" or \"git remote new\" along with a\nreference to it in the manpage of \"git push\" might have helped\nthese users.\n\n-- \n   // Bernie Innocenti - http://www.codewiz.org/\n \\X/  Sugar Labs       - http://www.sugarlabs.org/\n"}]}