Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

/media/Segate/Repos/project01.git

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

/mc2012/mylocalrepos/project01

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
2  
you shouldnt create the local repo before cloning, cloning will create it. –  Joakim Elofsson Nov 14 '12 at 12:33
1  
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
1  
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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.