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 inherited a position and instructions for creating a new git repository. Unfortunately I've run into problems and no one here knows what to do. Hoping someone can help me out.

Here are the instructions I was left:

Create a new repository:

  1. For these steps you need to be in the gitosis-admin repository, if you don't have it, in a suitable parent folder do: git clone git@xxx.xxx.x.xx:gitosis-admin.git
  2. Edit gitosis.conf file - in gitosis-admin root, under [group base-repo] section, add the name of the new repo to the end of the "writable =" section.
  3. Commit change and push back to gitosis-admin master.
  4. For the next commands, my_new_project represents the name of your project
  5. mkdir my_new_project
  6. cd my_new_project
  7. git init
  8. Copy in any files you want to use to start the repo
  9. git commit -a -m "Initializing new repository"
  10. git remote add origin git@192.168.4.20:my_new_project.git
  11. git push master
  12. git push master:qa

So I did 1 and 2, with no problem. It created a local folder on my machine called gitosis-admin. I edited the gitosis.conf file as indicated. But when I try to do step 3 (which I assume is git push gitosis-admin master) bash tells me that

fatal: 'master' does not appear to be a git repository

fatal: The remote end hung up unexpectedly

What am I doing wrong?

share|improve this question
    
Check this out, this may solve your problem: stackoverflow.com/questions/7318918/… –  John Powel Nov 5 '12 at 22:01
    
Eh. Now I get a different error. Tried git remote add origin git@xxx.xxx.x.xx:loyalty.git (my new project name) and it tells me fatal: remote origin already exists. –  EmmyS Nov 5 '12 at 22:19

1 Answer 1

up vote 0 down vote accepted

"origin" is only the local NAME of the remote repository, it is not part of the command.

For example, you can write anything like:

git remote add fakeorigin git@xxx.xxx.x.xx:loyalty.git

To delete a remote repo, type:

git remote rm origin

Reference: http://www.kernel.org/pub/software/scm/git/docs/git-remote.html

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.