:remote_cache is the new default in cap3. For cap2, that is a valid
suggestion.

The logic is safety. We would be negligent if the default was to dump your
entire project into your webroot, so for that reason the .git directories
are never checked out, in fact we use `git archive` to make sure they never
exist on disk.

To avoid this, you can easily patch (using Rake, or Ruby) the git methods
to checkout in the way you prefer see:

   -
   
https://github.com/capistrano/capistrano/blob/master/lib/capistrano/tasks/git.rake#L41
   -
   
https://github.com/capistrano/capistrano/search?utf8=%E2%9C%93&q=%22def+clone%22


Lee Hambley
http://lee.hambley.name/
+49 (0) 170 298 5667

On 27 February 2015 at 08:32, troels knak-nielsen <tro...@knak-nielsen.dk>
wrote:

> Isn't this covered by :deploy_via, :remote_cache?
>
>
> On Friday, February 27, 2015, Yar Dmitriev <yar.dmitr...@gmail.com> wrote:
>
>> Hi
>>
>> When a specific commit is deployed and runs on a server, I think it is
>> useful to keep .git subdirectory with it.
>>
>> Why?
>>
>> 1) Having the git repo with the correct HEAD allows to run `git status`,
>> for example, and quickly inspect the working copy for any possible changes
>> or additions.
>>
>> 2) The other possible use is lightning-fast updates (for simpler cases,
>> where atomicity is not important) using git 2.3's "push to deploy" feature
>> (see https://github.com/blog/1957-git-2-3-has-been-released). The
>> working tree files will be updated automatically.
>>
>> Can anybody suggest how to achieve this with Capistrano 3, without
>> hacking it too much?
>>
>> Of course, I know that it is a good practice to always make a proper
>> release, in its own directory. However, there are times when it is vital to
>> fix a production problem very quickly. Or times when you want to preview
>> numerous small updates at a staging server in quick succession.
>>
>> I tried running `git --git-dir=<my project>/repo --work-tree=<my
>> project>/current status`. Strangely, git shows every file as deleted and
>> untracked in that case.
>>
>>
>> (Using Capistrano 3.3.5, git 2.3.1.167).
>>
>> Best regards
>> ---
>> Yar
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Capistrano" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to capistrano+unsubscr...@googlegroups.com.
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msgid/capistrano/88b8f83b-aff9-474b-87da-2f204415808d%40googlegroups.com
>> <https://groups.google.com/d/msgid/capistrano/88b8f83b-aff9-474b-87da-2f204415808d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to capistrano+unsubscr...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/CAM1FnQ4dchaMc7rtc-gVtQ%3D9iuReuDynQD3XxfQEWhEzSFX5Nw%40mail.gmail.com
> <https://groups.google.com/d/msgid/capistrano/CAM1FnQ4dchaMc7rtc-gVtQ%3D9iuReuDynQD3XxfQEWhEzSFX5Nw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/CAN_%2BVLUpcC6xY7%3D57U4VXrFAj9jtSLKGxe55VfC3PC9gQSKwEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to