diff --git a/lib/github_heroku_deployer/git.rb b/lib/github_heroku_deployer/git.rb index 4894e88..61be9c3 100644 --- a/lib/github_heroku_deployer/git.rb +++ b/lib/github_heroku_deployer/git.rb @@ -53,7 +53,8 @@ def exists_locally? def clone wrapper = ssh_wrapper @logger.info "cloning #{@github_repo} to #{folder}" - run "env #{wrapper.git_ssh} git clone #{@github_repo} #{folder}" + @logger.info "unsetting GIT_WORK_TREE" + run "unset GIT_WORK_TREE; env #{wrapper.git_ssh} git clone #{@github_repo} #{folder}" ensure wrapper.unlink end