To view this screencast, add it to
your cart
and
checkout.
You can buy this screencast for any price, including FREE!
PushAnd is a little tool that makes it easy to push any git repository to a computer and … do something (run a script).
1 # Running this will setup your computer so you can push repositories to it 2 $ git clone git://github.com/remi/pushand.git 3 $ cd pushand 4 $ sudo ./pushand_server_install
When PushAnd is installed on your computer, you can push repositories to it via SSH.
If you have an executable .pushand script in the root of your repository, it will be run on the server.
1 $ mkdir random-repo 2 $ cd random-repo 3 $ git init 4 $ vi .pushand 5 6 #! /bin/bash 7 echo "--> Hello from .pushand ... this file is $0" 8 9 $ chmod +x .pushand 10 $ git add . 11 $ git commit -a -m "init repo" 12 $ git remote add origin remi@localhost:/home/remi/random-repo.git 13 $ git push origin master 14 Counting objects: 3, done. 15 Writing objects: 100% (3/3), 238 bytes, done. 16 Total 3 (delta 0), reused 0 (delta 0) 17 To remi@localhost:/home/remi/random-repo.git 18 * [new branch] master -> master 19 Checked out master branch 20 --> Hello from .pushand ... this file is /home/remi/random-repo.git/.pushand