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

is there a trick to run commands on a remote repository

From
GGelonida <gelonida@gmail.com>
Date
Jun 18, 2010, 21:54 UTC
Message-ID
<hvgpu0$rbh$1@dough.gmane.org>
Hi,
I'd like to get information from a remote git repository.

Example: git branch -v

If the remote repository were remotehost:/a/long/path/repo.git m then I could type

ssh remotehost "cd a/long/path/repo.git ; git branch -v"

If the remote repository were file://a/long/path/repo.git , then I had to type ( cd /a/long/path/repo.git ; git branch -v )

I could write a script, which parses the repository name and executes then the correct command.

I just wondered, whether git has already some bult in tricks, which would help me avoiding to implement my own potentially faulty script.

I'm interested in executing 'read only' commands like

git branch git log

thanks in advance for any suggestions
Message 1 of 1 in “is there a trick to run commands on a remote repository”
  1. GelonidaJun 18, 2010

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.