Questions tagged [git-clone]

Obtains a local copy of a remote Git repository.

1359 questions
203
votes
5 answers

Unable to Connect to GitHub.com For Cloning

I am trying to clone the angular-phonecat git repository, but I am getting the following message when I enter the command in my Git Bash: $ git clone git://github.com/angular/angular-phonecat.git Cloning into 'angular-phonecat'... fatal: unable…
Mohamed Hussain
  • 7,433
  • 14
  • 55
  • 85
197
votes
1 answer

Empty Git submodule folder when repo cloned

I have one repo hosted at https://github.com/aikiframework/json. On my local copy, I added a submodule using the command: git submodule add git@github.com:jcubic/json-rpc.git json-rpc Then I did a commit and push, and the changes appear on GitHub…
jcubic
  • 61,973
  • 54
  • 229
  • 402
191
votes
6 answers

How do I clone a GitHub wiki?

How do I clone my GitHub repository's wiki? I know it's saved as a separate Git repository, but I can't remember the path. I've tried ...reponame/wiki.git and ...reponame.git/wiki, but neither are correct.
joseph.hainline
  • 24,829
  • 18
  • 53
  • 70
171
votes
3 answers

How to update a git clone --mirror?

I have created a git repository to mirror a live site (which is a non-bare git repository): git clone --mirror ssh://user@example.com/path/to/repo Now, to keep this mirror clone updated with all changes from its remote origin, which command or…
J. Bruni
  • 20,322
  • 12
  • 75
  • 92
133
votes
16 answers

fatal: could not create work tree dir 'kivy'

I'm trying to clone my fork of the kivy git, but it's not working. I've made the fork correctly, I believe, but when I type this into my Mac terminal: git clone https://github.com/mygitusername/kivy.git I get this error: fatal: could not create…
AndroidDev
  • 20,466
  • 42
  • 148
  • 239
132
votes
14 answers

"fatal: Not a git repository (or any of the parent directories)" from git status

This command works to get the files and compile them: git clone a-valid-git-url for example: git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/liggghts However, git status (or any other git command) then gives the above fatal: Not a git…
Kevin Kostlan
  • 3,311
  • 7
  • 29
  • 33
102
votes
1 answer

How do I shallow clone a repo on a specific branch?

How do I shallow clone a git repository, so that my clone contains only 1 history item, and starts on a specific branch? I know how to do a shallow clone: git clone --depth 1 https://path/to/myrepo.git but not start the clone on a specific branch.
99
votes
3 answers

How to clone seed/kick-start project without the whole history?

Note that using --depth=1 parameter prevents you from pushing the project to a new repository.
itamar
  • 1,800
  • 4
  • 17
  • 30
81
votes
5 answers

Difference between git remote add and git clone

What does the clone command do? Is there any equivalent to it in svn? What is the difference between git remote add test git://github.com/user/test.git And git clone git://github.com/user/test.git Does the name of the created repo matter?
nacho4d
  • 43,720
  • 45
  • 157
  • 240
81
votes
4 answers

Retrospectively add --recursive to a git repo

If you git clone with --recursive, you can get all the git submodules too. If I've forgotten to add this magical flag when cloning, as can happen, how do I now go and get any submodules? Additionally, how can I set the recursive flag as a default…
kenneth
  • 1,093
  • 1
  • 8
  • 10
77
votes
1 answer

What exactly is a "grafted" commit in a shallow clone?

When doing a shallow clone in git (using the --depth option), the root commit is marked as grafted. Googling didn't lead to any satisfacting documentation. It doesn't seem to have anything to do with git grafts, which the similar terminology would…
Sascha Wolf
  • 18,810
  • 4
  • 51
  • 73
75
votes
8 answers

error: cannot run ssh: No such file or directory when trying to clone on windows

I am trying to clone a remote repository on Windows, but when I did this: git clone git@github.com:organization/xxx.git I got this error: error: cannot run ssh: No such file or directory fatal: unable to fork Am I missing something?
Malloc
  • 15,434
  • 34
  • 105
  • 192
65
votes
3 answers

Explain clones info in Github's Traffic tab

In a recent question I made, one of the answers pointed to another answer in another question where a way to explore the forks and clones of a public Github repo was shared. I went ahead and did that with my own public repo and came up with this…
Gabriel
  • 40,504
  • 73
  • 230
  • 404
63
votes
5 answers

How to clone git repository from its zip

I'm trying to clone a remote repository on github, but it is big and my connection doesn't seem to be stable enough, so I can't clone it successfully. But I have successfully downloaded the .zip of the repository. Is there a way to use this zip as…
Lesto
  • 2,260
  • 2
  • 19
  • 26
63
votes
1 answer

Why do some repository URLs end in .git while others don't?

When I clone a repository, is there any difference between these two URLs? Without .git extension: git clone http://foo/repo With .git extension: git clone http://foo/repo.git
user496949
  • 83,087
  • 147
  • 309
  • 426
1 2
3
90 91