Obtains a local copy of a remote Git repository.
Questions tagged [git-clone]
1359 questions
426
votes
31 answers
Clone A Private Repository (Github)
I have a private repository on Github for a project I'm working on. Until now I had only worked on my home desktop, but I just bought a laptop, and am trying to set it up so that I can work on the project from either computer, and push / pull…

Solomon
- 6,145
- 3
- 25
- 34
330
votes
5 answers
How to git-svn clone the last n revisions from a Subversion repository?
Problem
How do you create a shallow copy with git-svn from a Subversion repository, e.g. how do you pull only the last three revisions?
The git clone command can get the last n revisions from a Git repository if you use the option --depth, i.e. you…

Lernkurve
- 20,203
- 28
- 86
- 118
319
votes
10 answers
git clone through ssh
I have a project on which I created a git repository:
$ cd myproject
$ git init
$ git add .
$ git commit
I the wanted to create a bare clone on another machine:
$ cd ..
$ git clone --bare myproject …

dlsa
- 3,402
- 2
- 17
- 17
310
votes
2 answers
Is it safe to shallow clone with --depth 1, create commits, and pull updates again?
The --depth 1 option in git clone:
Create a shallow clone with a history truncated to the specified number of revisions. A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is…

artfulrobot
- 20,637
- 11
- 55
- 81
281
votes
8 answers
BitBucket - download source as ZIP
I know I can get the project through git clone command, but is there any way, how to download the project through the web interface from BitBucket.org?
In the best way, I am looking for a way to download a project source as ZIP compress file.

user984621
- 46,344
- 73
- 224
- 412
259
votes
19 answers
Files showing as modified directly after a Git clone
I'm having an issue with a repository at the moment, and though my Git-fu is usually good, I can't seem to solve this issue.
When I clone this repository, then cd into the repository, git status shows several files as changed. Note: I haven't opened…

Sam Elliott
- 3,870
- 2
- 19
- 22
259
votes
3 answers
Bower install using only https?
I am trying to set up Bower on a build server at our organization's data center, but git's port does not appear to be open on the data center's firewall. I can use the git command line client to clone via https://[repo], but not git://[repo].
Is…

Matt Mills
- 8,692
- 6
- 40
- 64
251
votes
17 answers
How to complete a git clone for a big project on an unstable connection?
I am trying to git clone the LibreOffice codebase, but at the moment I have an internet connection of about 300kbps and it's just anything but stable. I can get the connection back any moment, but then the git clone process already stopped working,…

LaPingvino
- 2,803
- 2
- 18
- 17
247
votes
3 answers
What is git doing when it says it is "resolving deltas"?
During the first clone of a repository, git first receives the objects, and then spends about the same amount of time "resolving deltas". What's actually happening during this phase of the clone?

Nik Reiman
- 39,067
- 29
- 104
- 160
244
votes
8 answers
git clone from another directory
I am trying to clone repo from another directory.
Lets say I have one repo in C:/folder1 and C:/folder2
I want to clone the work in folder1 into folder2.
What would I type into the command prompt to do this?
It seems that often when cloning a URL…

SeekingAlpha
- 7,489
- 12
- 35
- 44
237
votes
9 answers
Git clone particular version of remote repository
I cloned a remote git repository about a month ago. The remote repository has undergone many changes and has now become unstable. Now I need another copy of the repository, version identical to the one I cloned a month ago.
How do I do this?

nandu
- 2,563
- 2
- 16
- 14
234
votes
35 answers
Git: Permission denied (publickey) fatal - Could not read from remote repository. while cloning Git repository
I am unable to clone a Git repository, and getting this error:
krishna.soni@KRISHNACHANDRAS /c/Projects $ git clone http://stage.abc.com:10088/pqr
http:/// Cloning into ''... fatal: could not read Username for…

KCS
- 2,937
- 4
- 22
- 32
224
votes
46 answers
How to clone all repos at once from GitHub?
I have a company GitHub account and I want to back up all of the repositories within, accounting for anything new that might get created for purposes of automation. I was hoping something like this:
git clone git@github.com:company/*.git
or…

numb3rs1x
- 4,673
- 5
- 31
- 44
215
votes
9 answers
Git clone without .git directory
Is there a flag to pass to git when doing a clone, say don't clone the .git directory? If not, how about a flag to delete the .git directory after the clone?

Justin
- 42,716
- 77
- 201
- 296
209
votes
9 answers
GIT clone repo across local file system in windows
I am a complete Noob when it comes to GIT. I have been just taking my first steps over the last few days. I setup a repo on my laptop, pulled down the Trunk from an SVN project (had some issues with branches, not got them working), but all seems…

Jon
- 15,110
- 28
- 92
- 132