Skip to main content

Allows running custom commands on a git remote.

Project description

This package defines a git-remote-run command, which allows running custom commands on a git remote.

This can be used, for example, to set up the actual remote repository, as in:

$ git remote add remote-repo user@server:path/to/repo
$ git remote-run remote-repo -c '
    mkdir -p $REPO_DIR
    git init --bare $REPO_DIR
    echo echo it works! > $REPO_DIR/hooks/update
    chmod +x $REPO_DIR/hooks/update'
Initialized empty Git repository in /home/user/path/to/repo/
$ git push remote-repo master
remote: it works!

See git remote-run -h for more options.

How does it work?

git-remote-run doesn’t attempt any parsing of the git remote URL on its own, nor does it make assumptions about the transport used. Instead, it relies on git’s built-in ability to run commands on the remote side.

Git uses this ability in its git archive –remote=… command, to create an archive of a remote repository. We abuse this ability a little bit by sending a custom script to run as the –exec parameter.


Radek Czajka


This project is licensed under the MIT License – see the LICENSE file for details.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for git-remote-run, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size git_remote_run-1.2-py3-none-any.whl (7.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size git-remote-run-1.2.tar.gz (6.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page