How to run git command remotely?

How to run git command on remote computer? I want to run git show or git log on remote computer. how to run command similar to subversion? what is your solution?
Update:
For example I have a server that can connect to it by ssh or over http protocol and my source code saved on that server. I want to access to change set detail programmatically by ruby via git command without cloning.

  • My company is a Rackspace Cloud client (provided to us for free) and I'm trying to find some way to set up version control
  • How can I trigger garbage collection on a Git remote repository?
  • How to break a series of git commits into patches for submission to another project
  • Cannot push to remote git repo over ssh, stuck at “Writing objects: 11%”
  • Set debuild/dpkg to always ignore .git directories
  • Force git to run post-receive hook, even if everything is “up-to-date”
  • Gerrit email notification for push to master branch
  • Using Git to work with subversion: Ignoring modifications to tracked files
  • Can't push in GIT, but rebase up-to-date
  • Concurrency in a GIT repo on a network shared folder
  • How to check if the commit exists in a Git repository by its SHA-1
  • Python+Git on for remote repository
  • One Solution collect form web for “How to run git command remotely?”

    If you literally want to run the command remotely, do it over SSH:

    ssh username@host "cd my/repo/path && git show"
    
    Git Baby is a git and github fan, let's start git clone.