diff --git a/man/git-scp.1 b/man/git-scp.1 index 9a1c43f..8ca90ad 100644 --- a/man/git-scp.1 +++ b/man/git-scp.1 @@ -104,7 +104,7 @@ $ git remote add staging myStagingServer:/var/www/html .IP "" 0 . .P -Copy unstaged files to remote +Copy unstaged files to remote\. Useful when you want to make quick test without making any commits . .IP "" 4 . @@ -181,6 +181,21 @@ $ git scp staging js/vendor/ . .IP "" 0 . +.P +Copy files from specific directory to multiple servers +. +.IP "" 4 +. +.nf + +$ for dest in web1 web2 web3; do + git diff \-\-name\-only 4\.8\.3 4\.8\.2 app/code/community app/design skin/ | xargs git scp $dest +done; +. +.fi +. +.IP "" 0 +. .SH "AUTHOR" Written by Chern Jie <\fIlim@chernjie\.com\fR> . diff --git a/man/git-scp.html b/man/git-scp.html index 8e611c9..f09f6aa 100644 --- a/man/git-scp.html +++ b/man/git-scp.html @@ -126,7 +126,7 @@
$ git remote add staging myStagingServer:/var/www/html
 
-

Copy unstaged files to remote

+

Copy unstaged files to remote. Useful when you want to make quick test without making any commits

$ git scp staging
 
@@ -156,9 +156,16 @@
$ git scp staging js/vendor/
 
+

Copy files from specific directory to multiple servers

+ +
$ for dest in web1 web2 web3; do
+    git diff --name-only 4.8.3 4.8.2 app/code/community app/design skin/ | xargs git scp $dest
+done;
+
+

AUTHOR

-

Written by Chern Jie <lim@chernjie.com>

+

Written by Chern Jie <lim@chernjie.com>

REPORTING BUGS

diff --git a/man/git-scp.md b/man/git-scp.md index a136bcd..a13c9d3 100644 --- a/man/git-scp.md +++ b/man/git-scp.md @@ -45,7 +45,7 @@ Internally this script uses `rsync` and not `scp` as the name suggests. $ git remote add staging myStagingServer:/var/www/html - Copy unstaged files to remote + Copy unstaged files to remote. Useful when you want to make quick test without making any commits $ git scp staging @@ -69,6 +69,12 @@ Internally this script uses `rsync` and not `scp` as the name suggests. $ git scp staging js/vendor/ + Copy files from specific directory to multiple servers + + $ for dest in web1 web2 web3; do + git diff --name-only 4.8.3 4.8.2 app/code/community app/design skin/ | xargs git scp $dest + done; + ## AUTHOR Written by Chern Jie <>