Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunny/git-deploy
git alias to do remote git pulls.
https://github.com/sunny/git-deploy
Last synced: 2 months ago
JSON representation
git alias to do remote git pulls.
- Host: GitHub
- URL: https://github.com/sunny/git-deploy
- Owner: sunny
- Created: 2013-01-21T17:08:19.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2020-06-14T09:45:19.000Z (over 4 years ago)
- Last Synced: 2024-10-09T21:01:12.704Z (2 months ago)
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 7
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
$ git deploy
============Git push then pull over ssh.
How
---Supposing you have a git remote over SSH
(for example : `[email protected]:thatproject/origin.git`)
with these directories:thatproject/origin.git
thatproject/dev/.git
thatproject/prod/.gitThis script will let you push and pull it in `dev/` and `prod/`, just by calling locally:
```sh
$ git deploy dev
$ git deploy prod
```Install
-------Make sure the `~/bin` folder exists and is in your `$PATH`, then:
```sh
$ curl https://raw.githubusercontent.com/sunny/git-deploy/master/git-deploy.sh > ~/bin/git-deploy
$ chmod +x ~/bin/git-deploy
$ git config --global alias.deploy '!git-deploy'
```Update
------```sh
$ curl https://raw.githubusercontent.com/sunny/git-deploy/master/git-deploy.sh > ~/bin/git-deploy
```Branches
--------If the local branch is different from the remote one, it will push it and switch to it
in your remote directory.Hooks
-----Other scripts can be launched before and after a deploy by using hooks.
These files will be called in this order during a deploy if they are executable:| Command | Local | Remote |
| --------- | ------ | ------- |
| `__scripts/deploy_before dev` | X | |
| `.git/hooks/post-merge` | | X |
| `__scripts/compile dev` | | X |
| `__scripts/deploy dev` | X | |