implement and use setup_git_deploy function

designed and written by wiretapped and za