What is my bottleneck when cloning a git repository from a virtual machine with a fast network connection?
Use the depth to create a shallow clone. git clone –depth 1 <repository>
Use the depth to create a shallow clone. git clone –depth 1 <repository>
OP wanted to retrieve all versions, but the answers would not deliver. Especially if the file has hundreds of revisions (all suggestions are too manual). The only half-working solution was proposed by @Tobias in the comments, but suggested bash loop would build files in random order as well as it generates hundreds of empty files … Read more
I suppose you could make a custom installation – rename the hooks in …/share/git-core/templates/hooks to remove the .sample suffix. You could also make a template directory full of symlinks to a hooks directory inside the repository, (e.g. post-checkout -> ../../hooks/post-checkout). Then if the cloned repo contained that particular hook, it’d get executed. You’re right, though, … Read more
You need to clone into a new directory, that is, that “Target Directory” that you specify should not already exist.
A MingW update provide a new way to handle redirection with Git 2.15.x/2.16 (Q1 2018) See commit b2f5571, commit 1a172e4, commit 3f94442 (01 Nov 2017) by Johannes Schindelin (dscho). (Merged by Junio C Hamano — gitster — in commit 421f21c, 09 Nov 2017) mingw: add experimental feature to redirect standard handles Particularly when calling Git … Read more
VonC is probably right, in that you need to fix your path, but I was facing the same problem despite using the correct one. In my case, I needed to start ssh-agent for the command to work. Running the sample commands from GitHub was not working, but, since I had installed OpenSSH, I simply started … Read more
Two answers so far (at the time I wrote this, now there are more) are correct in what they say, but don’t really answer the “why” question. Of course, the “why” question is really hard to answer, except by the authors of the various bits of Git (and even then, what if two frequent Git … Read more
ok, one way to do this is to use the clone –template option. Specify the location where the client side hooks will be stored as value to the –template switch. The hooks are copied to the clone, and the post-checkout hook is fired immediately!
You used the -s option to git svn clone, but from your example, it doesn’t appear that your Subversion repository is using the standard layout (i.e., trunk, branches, and tags directories at the repository root). If that’s the case, clone without -s.
As Jonathon Reinhart commented, you’re seeing the effect of merges. The –depth parameter refers to how deep Git goes on a “walk” from each starting point. As the documentation you quoted mentions, it also implies –single-branch, which simplifies talking about this. The important point here is that the walk visits all parents of each commit, … Read more