0

I'm following the AngularJS tutorial and am cloning the source code using the instructions:

Clone the angular-phonecat repository located at GitHub by running the following command:
git clone --depth=14 https://github.com/angular/angular-phonecat.git
This command creates the angular-phonecat directory in your current directory.

However, running this at
~\users\myuser\development
creates
~\users\myuser\development\angular-phonecat
but without the source code inside it. It creates the directory, but clones my personal bitbucket repository into the new directory.

Do I need to change a global or local setting or use another command or argument to force to git to pull from the repository declared in the command?


EDIT The following commands and output should add some colour:

machinename:development user$> git config --get remote.origin.url
https://stuperuser@bitbucket.org/stuperuser/spikes.git

machinename:development user$> ls
spikes sublime-projects

machinename:development user$> git clone --depth=14 https://github.com/angular/angular-phonecat.git Cloning into 'angular-phonecat'...
Password for 'https://stuperuser@bitbucket.org':
remote: Counting objects: 58, done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 58 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (58/58), done.
Checking connectivity... done.

machinename:development user$> ls
spikes sublime-projects
angular-phonecat

StuperUser
  • 10,555
  • 13
  • 78
  • 137
  • That command looks just fine. `git` may be magical in some ways but cloning is usually straightforward. Can you confirm that the `angular-phonecat` does not exist prior to running the `clone` command, and can you cut and paste both your actual comand line and any output that `git clone` produces? – larsks Feb 06 '15 at 17:22
  • Please add the exact command you type with the exact output given by that command. – michas Feb 06 '15 at 17:22
  • `~\users\myuser\development> git config --get remote.origin.url` returns one of my bitbucket respositories' .git urls. – StuperUser Feb 06 '15 at 17:25
  • Comments added. Looks like the development is mapped to spikes.git as well as development\spikes. – StuperUser Feb 06 '15 at 17:32
  • In fact running `~\users\myuser\> git config --get remote.origin.url` returns that bitbucket repository. Could I have set my entire global config to that one origin url? – StuperUser Feb 06 '15 at 17:35
  • Turns out git does exactly what you tell it to, even if you're daft enough to map the entire machine's origin to a single repository! – StuperUser Feb 06 '15 at 17:40

1 Answers1

0

I checked my
~\.gitconfig
global config, and I was pointing it to a single remote origin that was that particular repository.

Deleting that global setting and rerunning the command cloned the repository correctly.

StuperUser
  • 10,555
  • 13
  • 78
  • 137