git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Initial push to remote repository

From
PBPeter Baumann <waste.manager@gmx.de>
Date
Sep 19, 2007, 12:25 UTC
Message-ID
<20070919122558.GA4777@xp.machine.xx>
In-Reply-To
<20070919113557.GA24674@cip.informatik.uni-erlangen.de>
On Wed, Sep 19, 2007 at 01:35:57PM +0200, Thomas Glanzmann wrote:
Show 37 quoted lines
> Hello,
> I used to publish my local work on a machine with all my git
> repositories using the following commands:
> 
> # Publish a local created repository to a remote repository.
> ssh 131.188.30.102 git --git-dir=/home/cip/adm/sithglan/work/repositories/private/astro.git init-db
> git remote add origin 131.188.30.102:/home/cip/adm/sithglan/work/repositories/private/astro.git
> git push origin master:master
> echo >> .git/config <<EOF
> [branch "master"]
>         remote = origin
>         merge = refs/heads/master
> EOF
> git pull
> 
> But since my last update of git it doesn't seem to work that way anymore. Is
> there another way to do what I like to using the git way?
> 
>         (ad027088pc) [~] mkdir test_initial_push
>         (ad027088pc) [~] cd !$
>         (ad027088pc) [~/test_initial_push] touch a
>         (ad027088pc) [~/test_initial_push] git init
>         Initialized empty Git repository in .git/
>         (ad027088pc) [~/test_initial_push] git add a
>         (ad027088pc) [~/test_initial_push] git commit -m "whatever" a
>         Created initial commit 0d408ed: whatever
>         0 files changed, 0 insertions(+), 0 deletions(-)
>         create mode 100644 a
>         (reverse-i-search)`':
>         (ad027088pc) [~/test_initial_push] ssh 131.188.30.102 git --git-dir=/home/cip/adm/sithglan/work/repositories/private/test_initial_push.git init-db
>         Initialized empty Git repository in /home/cip/adm/sithglan/work/repositories/private/test_initial_push.git/
>         (ad027088pc) [~/test_initial_push] git remote add origin 131.188.30.102:/home/cip/adm/sithglan/work/repositories/private/test_initial_push.git/
>         You have new mail in /home/adglth0/Maildir
>         (ad027088pc) [~/test_initial_push] git push origin master:master
>         error: dst refspec master does not match any existing ref on the remote and does not start with refs/.
>         fatal: The remote end hung up unexpectedly
>         error: failed to push to '131.188.30.102:/home/cip/adm/sithglan/work/repositories/private/test_initial_push.git/'
Try to give it the full ref name and it should work, e.g.
	git push origin refs/heads/master:refs/heads/master
-siprbaum
Previous: Thomas GlanzmannNext: Thomas Glanzmann
Message 2 of 3 in “Initial push to remote repository”
  1. Thomas GlanzmannSep 19, 2007
  2. Peter BaumannSep 19, 2007
  3. Thomas GlanzmannSep 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.