Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating central repository in Git from existing local repository (in Windows)

Tags:

git

repository

I've looked around StackOverflow and other places (including Git documentation) and just cannot get this to work. Here's what i've done:

To setup central repository (on //SomeUNC);

git init --bare Central.git

This creates a //SomeUNC/Central.git folder.

Now, in local repository, i try:

git remote add Central //SomeUNC/Central.git (this is ok)
git push -all Central

This gives the error:

fatal: 'Central' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

I'm sure I'm missing something simple. Thank for any help!

like image 443
rht341 Avatar asked Jun 21 '12 15:06

rht341


1 Answers

It sounds like your paths aren't valid. Delete the bare repository and try this from your local repository working folder:

git init --bare //UNC/Path/to/Central.git
git remote add Central //UNC/Path/to/Central.git
git push --all Central
like image 155
Justin ᚅᚔᚈᚄᚒᚔ Avatar answered Nov 10 '22 01:11

Justin ᚅᚔᚈᚄᚒᚔ