Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created a bare repository on an external hard disk in path


Then I've added and commit the latest version of my project sources to this repository.

Then I created another repository on my local hard disk in the path


Now I am trying to get a working copy from the 'bare' repository, so I navigated to the local repo and tried to execute the following command:

$git clone /media/Segate/Repos/project01.git

but it is not recognizing the path, even though I am 100% positive it is there :( So can someone please help me by telling me what I am doing wrong here? And how I can get a full working copy from the bare repo to put it in the local repo?

Error I get for $git clone /media/Segate/Repos/project01.git is 'Too many parameters'

Here is all the commands I executed: In /media/Segate/Repos/project01.git

$git init --bare 

Then I went to the source folder and from within this folder I executed:

git init 
git add . 
git commit -m 'first commit' 
git remote add origin /media/Segate/Repos/project01.git 
git push --all 

Then I went to an EMPTY folder /mc2012/mylocalrepos/project01 and tried to clone by typing the command

$git clone /media/Segate/Repos/project01.git

but it game me an error 'Too many parameters'

share|improve this question
you shouldnt create the local repo before cloning, cloning will create it. – Joakim Elofsson Nov 14 '12 at 12:33
Make sure you called git init in your primary repository, and have not already created your secondary repository (do not call git init on the second repository, as mentioned; git clone will do this for you). – Breakthrough Nov 14 '12 at 12:46
Okay, folks, I've cleaned up the comments here. If you'd like to discuss, please use Super User Chat instead. – slhck Nov 14 '12 at 16:36

When you did the "git add .", "git commit ..." dance, you stashed the files away in the same directory where you have the source. Nothing ever made it to the bare repo.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .