```ruby
namespace :git do
  desc "Clones the Git repository to the release path."
  task :clone do
    settings.revision ||= `git rev-parse HEAD`.strip

    queue %{
      echo "-----> Cloning from the Git repository"
      git clone "#{settings.repository!}" . -n --recursive &&
      git checkout "#{revision}" 2>/dev/null &&
      rm -rf .git
    }
  end
end
```

Fix the 'Git failing without warning' bug when the current rev hasn't been pushed.
user
```ruby
namespace :git do
  desc "Clones the Git repository to the release path."
  task :clone do
    settings.revision ||= `git rev-parse HEAD`.strip

    queue %{
      echo "-----> Cloning from the Git repository"
      git clone "#{settings.repository!}" . -n --recursive &&
      git rev-parse "#{revision}" 1>/dev/null &&
      git checkout "#{revision}" 2>/dev/null &&
      rm -rf .git
    }
  end
end
```
assistant