Skip to content

Instantly share code, notes, and snippets.

@comfuture
Created November 11, 2010 17:56
Show Gist options
  • Save comfuture/672902 to your computer and use it in GitHub Desktop.
Save comfuture/672902 to your computer and use it in GitHub Desktop.
sync local added file to remote git repository
on adding folder items to dropbox after receiving added_files
set firstFileName to the name of item 1 of added_files
set numFiles to count items in added_files
repeat with i from 1 to number of items in added_files
set posixPath to POSIX path of (item i of added_files as string) as string
do shell script "git add " & posixPath
end repeat
do shell script "git commit -a -m'added " & firstFileName & "...'"
do shell script "git push"
end adding folder items to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment