Today I Learned

hashrocket A Hashrocket project

Clone local git repo

I git clone github repositories all the time but I didn't realize you could clone a git repo on the file system.

git clone myproject myproject2

And what's crazier, I can clone the .git dir directly and I get the same result.

git clone myproject/.git myproject2

This is important because Capistrano creates a 'repo' dir on the target server that is a copy of the .git directory but is detached from any working tree (the set of files you'd normally see in a git repo).

To clone from a capistrano server you can copy the repo dir locally and git clone it.

See More #git TILs