git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gelonida <gelonida@gmail.com>
To: git@vger.kernel.org
Subject: is there a trick to run commands on a remote repository
Date: Fri, 18 Jun 2010 23:54:08 +0200	[thread overview]
Message-ID: <hvgpu0$rbh$1@dough.gmane.org> (raw)

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

                 reply	other threads:[~2010-06-18 21:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hvgpu0$rbh$1@dough.gmane.org' \
    --to=gelonida@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).