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

Pushing a git repository to a new server

From
Ethan Reesor <firelizzard@gmail.com>
Date
Feb 10, 2013, 21:00 UTC
Message-ID
<CAE_TNin0Kb_38gnx9W36VZ8CTxYBZ9T1Dkhar1DUFHyQUq7ebg@mail.gmail.com>

I'm looking to make a command to push a git repo to a new server. The way I just did it is as follows:

localhost> git clone --bare /path/to/MyRepo /path/to/tmpdir/MyRepo.git localhost> tar xz /path/to/tmpdir/MyRepo.git | ssh myuser@remotehost tar cz \~/ # If I don't escape '~', my local machine expands it localhost> ssh myuser@remotehost remotehost> sudo chown -R git:git MyRepo.git

The reason I had to use my user is the git user's shell is git-prompt and ~git/git-shell-commands is empty. I have repos set up using 'git@remotehost:MyOtherRepo.git' as the remote and everything works.

How do I make a git command that can talk to the server using git-prompt like the other commands do?

-- Ethan Reesor

Next: Konstantin Khomoutov
Message 1 of 10 in “Pushing a git repository to a new server”
  1. Ethan ReesorFeb 10, 2013
  2. Konstantin KhomoutovFeb 11, 2013
  3. Ethan ReesorFeb 11, 2013
  4. Konstantin KhomoutovFeb 11, 2013
  5. Ethan ReesorFeb 11, 2013
  6. Jeff KingFeb 11, 2013
  7. Ethan ReesorFeb 11, 2013
  8. Michael J GruberFeb 12, 2013
  9. Jeff KingFeb 12, 2013
  10. Michael J GruberFeb 13, 2013

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.