Skip to content

Instantly share code, notes, and snippets.

@webspectyler
Last active December 10, 2015 00:08
Show Gist options
  • Select an option

  • Save webspectyler/4348716 to your computer and use it in GitHub Desktop.

Select an option

Save webspectyler/4348716 to your computer and use it in GitHub Desktop.
Bash script to upload last committed files in git to FTP
for i in `git diff-tree -r --name-only HEAD^ HEAD`; do curl -T "$i" ftp://example.com/$i --user username:password --ftp-create-dirs; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment