Last active
December 6, 2017 09:18
-
-
Save alexej-d/e6cdd6f4ec21391e582b6d829e79611f to your computer and use it in GitHub Desktop.
Sync changes on remote environment to local directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh user@server.com "cd PROJECT_DIR; git status -s" | awk '{print $2}' | sed 's/\(.*\)/rsync -cav user@server.com:\/full\/path\/to\/PROJECT_DIR\/\1 .\/\1/' | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment