git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to init a empty repo for pushing?
@ 2009-04-03 18:17 Changsheng Jiang
  2009-04-03 18:23 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Changsheng Jiang @ 2009-04-03 18:17 UTC (permalink / raw)
  To: git

Hi list,

I have a repository in my laptop, and need to push the repo to a
remote server using ssh protocol.

I know how to init a original repo. But the repo in the server is not
original, the laptop repo is.

Just 'git init' in server, then 'git push server' after 'git remote
add server ...'  in laptop gives error.

Thanks,
Changsheng Jiang

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to init a empty repo for pushing?
  2009-04-03 18:17 How to init a empty repo for pushing? Changsheng Jiang
@ 2009-04-03 18:23 ` Jeff King
  2009-04-03 18:27   ` Changsheng Jiang
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2009-04-03 18:23 UTC (permalink / raw)
  To: Changsheng Jiang; +Cc: git

On Sat, Apr 04, 2009 at 02:17:33AM +0800, Changsheng Jiang wrote:

> Just 'git init' in server, then 'git push server' after 'git remote
> add server ...'  in laptop gives error.

It's hard to say without seeing the error message, but I'm assuming it
was along the lines of "No refs in common".

By default, "git push server" will push matching branches (i.e., ones
that both the client and the server have in common). To push a new
branch, you say "git push server $BRANCH", or even just "git push --all
server".

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to init a empty repo for pushing?
  2009-04-03 18:23 ` Jeff King
@ 2009-04-03 18:27   ` Changsheng Jiang
  0 siblings, 0 replies; 3+ messages in thread
From: Changsheng Jiang @ 2009-04-03 18:27 UTC (permalink / raw)
  To: Jeff King; +Cc: git

On Sat, Apr 4, 2009 at 02:23, Jeff King <peff@peff.net> wrote:
> On Sat, Apr 04, 2009 at 02:17:33AM +0800, Changsheng Jiang wrote:
>
>> Just 'git init' in server, then 'git push server' after 'git remote
>> add server ...'  in laptop gives error.
>
> It's hard to say without seeing the error message, but I'm assuming it
> was along the lines of "No refs in common".
>
> By default, "git push server" will push matching branches (i.e., ones
> that both the client and the server have in common). To push a new
> branch, you say "git push server $BRANCH", or even just "git push --all
> server".
Thanks, 'git push --all server' works.

>
> -Peff
>

Changsheng Jiang

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-03 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-03 18:17 How to init a empty repo for pushing? Changsheng Jiang
2009-04-03 18:23 ` Jeff King
2009-04-03 18:27   ` Changsheng Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).