Created
August 24, 2016 12:10
-
-
Save elazdins/b6cb9568139750c167d6fe3c9987ee03 to your computer and use it in GitHub Desktop.
Pull in latest FTP changes from a remote server and create a new git branch based on them
This file contains hidden or 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
#! /bin/bash | |
now=$(date +"%d-%m-%Y") | |
cd /path/to/local/project | |
git checkout master | |
git pull remote master | |
git branch $now | |
git checkout $now | |
lftp -e 'set ssl:verify-certificate no; mirror -P 10 -v /remote/folder/ /path/to/local/project/.' -u username,password FTP_SERVER_IP | |
git add -A | |
git commit -m 'latest changes from the remote server' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment