Obtains a local copy of a remote Git repository.
Questions tagged [git-clone]
1359 questions
32
votes
3 answers
Git svn clone: How to defer fetch of revision history
I often have the case that I want to work on a SVN repository right away. But an ordinary git svn clone [url] also clones the entire history. So I want to speed things up. The first part is to fetch only the last revision into your Git repository. I…

Jesper Rønn-Jensen
- 106,591
- 44
- 118
- 155
30
votes
8 answers
Why does Heroku fail to detect Node.js buildpack?
I git cloned a Node.js application (the version specified in the package.json being 4.1.2 and that of my local machine being 6.2.2) and tried to git push on Heroku. But it failed to build and gave this error:
Failed to detect set buildpack…

Shree
- 533
- 1
- 5
- 10
29
votes
2 answers
How to propagate Git Hooks while cloning
I've written a pre-commit hook in my central repository. When my clients clone the repository it never propagates the hooks. I would like the hooks to also be copied to my clients' repositories. My clients are Windows users, using msysgit as the git…

baluchen
- 749
- 3
- 11
- 18
29
votes
2 answers
How to speed up / parallelize downloads of git submodules using git clone --recursive?
Cloning git repositories that have a lot submodules takes a really long time. In the following example are ~100 submodules
git clone --recursive https://github.com/Whonix/Whonix
Git clones them one by one. Takes much longer than required. Let's…

adrelanos
- 1,453
- 2
- 16
- 27
29
votes
3 answers
Git Clone is too slow
This is my first time to construct the git server. When I use TortoiseGit-1.8.1.0-32bit to handle the operation, everything is fine!
But if i use the git clone command or git bash, the git clone process speed is so slow. I've attached two images…

alvin
- 291
- 1
- 4
- 5
28
votes
3 answers
How to git clone with username and password in gitlab?
I am using gitlab . I want to write a .bat file which contains all the steps so that I can automate all the process , which are as follows:
open cmd.exe /k
git init
git clone https://username:password@gitlab.com/board.git ////// not working
git…

Blessy Julie
- 899
- 3
- 8
- 19
28
votes
2 answers
Cloning a branch : Remote branch branch-99 not found in upstream origin
How can I clone a branch from git with a specific Branch name?
I have a branch named branch-99 and my user name is Istiak.
I try to clone my branch like:
git clone -b branch-99 git@github.istiak/admin.git
I am receiving this error.
fatal: Remote…

Istiak Mahmood
- 2,330
- 8
- 31
- 73
28
votes
2 answers
Clone a private repo of github with username and password
I have configured Account A on my system with Global configurations and I can clone all my repos from there.
Now I don't want to change the configuration and I want to clone and do all operations of account B with my username and password. How can I…

Usman Afzal
- 558
- 1
- 6
- 13
27
votes
10 answers
git clone with https error - fatal: repository not found
I forked a private repository that I was invited to collaborate on but every time I try to clone with HTTPS, I get the following error message:
$ git clone https://github.com/usernamex/privat-repo.git
cloning into 'privat-repo'...
Username for…

shaleshock
- 405
- 1
- 4
- 7
26
votes
1 answer
What is the difference between clone and mkdir->cd->init->remote-add->pull?
After setting up a repo on Github, there seems to be two ways to pull that repo into a local repo.
Firstly, I could create a directory, initialize a blank repo, add a remote and then pull changes from the remote.
> mkdir "exampleProject"
> cd…

Rupert Madden-Abbott
- 12,899
- 14
- 59
- 74
26
votes
10 answers
Git clone leads to deleted & untracked files
I am new to Git.
I just installed Git (2.9.3) for Windows (10), then I opened git-bash and did a git clone . A new folder is created with the whole copy of the remote repository, which is good. But then I run a git status and I get a ton…

pHneutre
- 1,091
- 3
- 12
- 29
25
votes
1 answer
git clone: warning: --depth is ignored in local clones; use file:// instead
We have a remote repository on a shared folder in our local network. I attempted to make a shallow clone:
git clone --depth 1 //gitrepos-pc/git/foo/
It gave me this warning, and made a full clone:
warning: --depth is ignored in local clones; use…

sashoalm
- 75,001
- 122
- 434
- 781
25
votes
6 answers
git fetch --unshallow gives :"fatal: --unshallow on a complete repository does not make sense" error
I am unable to git clone a remote repository using plain
git clone path
I get the error "The remote end hung up unexpectedly".
The complete msg I get is :
Cloning into 'xyzabc'...
remote: Counting objects: 4328, done.
remote: Compressing objects:…

Rohit Rane
- 2,790
- 6
- 25
- 41
24
votes
5 answers
fatal: read error: Connection reset by peer
Can some one help me to get rid of following:
vijay13@ubuntu:~$ git clone git://anongit.kde.org/plasma-mediacenter
Cloning into 'plasma-mediacenter'...
fatal: read error: Connection reset by peer
And
vijay13@ubuntu:~$ git clone…

Vijay13
- 525
- 2
- 8
- 18
23
votes
6 answers
What does cloning a GitHub repository mean?
I am trying to integrate Facebook with my app. I read this on developers.facebook.com:
Install XCode
Install Git
Clone the GitHub repository with this command:
git clone git://github.com/facebook/facebook-ios-sdk.git
I have installed XCode and…

Piscean
- 3,069
- 12
- 47
- 96