{"thread":{"id":"18706","subject":"How to init a empty repo for pushing?","startedAt":"2009-04-03T18:17:33Z","lastAt":"2009-04-03T18:27:56Z","messageCount":3,"participants":["Changsheng Jiang","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"110300","messageId":"eafc0afe0904031117rbfd55cft5f40f1b45df1e454@mail.gmail.com","threadId":"18706","inReplyTo":null,"subject":"How to init a empty repo for pushing?","fromName":"Changsheng Jiang","fromEmail":"jiangzuoyan@gmail.com","sentAt":"2009-04-03T18:17:33Z","receivedAt":"2009-04-03T18:17:33Z","isPatch":false,"sender":{"key":"jiangzuoyan@gmail.com","avatar":"https://gravatar.com/avatar/61eb7704963065c5937698bacbc1412b6083e1d43f2cc9642999fe10b2e582f8?d=mp&s=160"},"body":"Hi list,\n\nI have a repository in my laptop, and need to push the repo to a\nremote server using ssh protocol.\n\nI know how to init a original repo. But the repo in the server is not\noriginal, the laptop repo is.\n\nJust 'git init' in server, then 'git push server' after 'git remote\nadd server ...'  in laptop gives error.\n\nThanks,\nChangsheng Jiang\n"},{"id":"110301","messageId":"20090403182312.GA15071@coredump.intra.peff.net","threadId":"18706","inReplyTo":"eafc0afe0904031117rbfd55cft5f40f1b45df1e454@mail.gmail.com","subject":"Re: How to init a empty repo for pushing?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-04-03T18:23:12Z","receivedAt":"2009-04-03T18:23:12Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Apr 04, 2009 at 02:17:33AM +0800, Changsheng Jiang wrote:\n\n> Just 'git init' in server, then 'git push server' after 'git remote\n> add server ...'  in laptop gives error.\n\nIt's hard to say without seeing the error message, but I'm assuming it\nwas along the lines of \"No refs in common\".\n\nBy default, \"git push server\" will push matching branches (i.e., ones\nthat both the client and the server have in common). To push a new\nbranch, you say \"git push server $BRANCH\", or even just \"git push --all\nserver\".\n\n-Peff\n"},{"id":"110302","messageId":"eafc0afe0904031127v24fafa20m37ab5436ebfe211a@mail.gmail.com","threadId":"18706","inReplyTo":"20090403182312.GA15071@coredump.intra.peff.net","subject":"Re: How to init a empty repo for pushing?","fromName":"Changsheng Jiang","fromEmail":"jiangzuoyan@gmail.com","sentAt":"2009-04-03T18:27:56Z","receivedAt":"2009-04-03T18:27:56Z","isPatch":false,"sender":{"key":"jiangzuoyan@gmail.com","avatar":"https://gravatar.com/avatar/61eb7704963065c5937698bacbc1412b6083e1d43f2cc9642999fe10b2e582f8?d=mp&s=160"},"body":"On Sat, Apr 4, 2009 at 02:23, Jeff King <peff@peff.net> wrote:\n> On Sat, Apr 04, 2009 at 02:17:33AM +0800, Changsheng Jiang wrote:\n>\n>> Just 'git init' in server, then 'git push server' after 'git remote\n>> add server ...'  in laptop gives error.\n>\n> It's hard to say without seeing the error message, but I'm assuming it\n> was along the lines of \"No refs in common\".\n>\n> By default, \"git push server\" will push matching branches (i.e., ones\n> that both the client and the server have in common). To push a new\n> branch, you say \"git push server $BRANCH\", or even just \"git push --all\n> server\".\nThanks, 'git push --all server' works.\n\n>\n> -Peff\n>\n\nChangsheng Jiang\n"}]}