Instead of duplicating all this logic, you could use `deployed_file_exists?("#{deploy_to}/.git")` like this:

```ruby
git "clone #{repository} ." unless deployed_file_exists?("#{deploy_to}/.git")
```