3 ms·
Can it work with file://?
by shmerl 4mo ago
Can it work with file://?
- js2 4mo agoYes: $ git init foo Initialized empty Git repository in .../foo/.git/ $ git clone "file://$PWD/foo" bar Cloning into 'bar'... But it's redundant: $ git clone bar baz Cloning into 'baz'... If you example .git/config in either clone, you'll see that remote.origin.url is the absolute path of the source repo. Note that you can share objects across clones on the same machine in various ways. See "--local", "--shared", and "--reference" in the git-clone man page. (GitHub uses this feature heavily. Or at least they did. I have no idea what their backend implementation is these days, but they must be doing some sort of copy-on-write CAS for forks.)
- shmerl 4mo agoGood to know, thanks. I should try it with vim.pack for local repos.