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.
License
This project is licensed under the MIT License – see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for git_remote_run-1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59ac1537549524893a3cdbcfbfd6bc9be7e933fc11d51f9289b24ba1dd274492 |
|
MD5 | f3a43c9fc74a4b2b0a676f550ae39b5b |
|
BLAKE2b-256 | 7f38724dbf0dc9241a64c14e06a0f96a504e4fea66ac08fc24d7ca7db9561510 |