2

im trying to delete this "origin" thing so i can actually run the tutorial code from this website

http://www.railstutorial.org/book#sec:github

this is the code im trying to run

$ git remote add origin [email protected]:delinquentme/first_app.git

and im getting this returned:

fatal: remote origin already exists

problem is though none of the files are up there!

****UPDATE****

so i just went ahead w the next step and typed out git push origin master

annnnd now its all uploaded...

im still a little shaky on what 'origin' is ... and what each piece of that line ACTUALLY do

2
  • This really is more of a question for superuser.com i think. Commented Jun 19, 2010 at 5:29
  • @halkeye: Er, SO is well-established as the place to ask version control questions. Commented Jun 19, 2010 at 6:26

3 Answers 3

4

if you run

$ git remote 

by itself you should get a list of remotes that are setup.

then you can do:

$ git remote rm origin 

to remove the origin remote.

$ git remote --help 

Will give you more information about the "git remote" command

Sign up to request clarification or add additional context in comments.

Comments

1

You can see what your origin currently is using this:

git remote show origin 

And you can remove it like this:

git remote rm origin 

Comments

1

origin does not describe something Git specific, it's just a name for a remote location. As mentioned you can see what remotes are currently in your repo by calling

git remote 

to remove a remote use

git remote rm <your-remote-name> 

in this case your remote name is origin

1 Comment

Does git default to the first remote in .git/config (and "origin" just usually happens to be the first remote) when no remote is specified, or are there any other way the default is determined? Previously I've just assumed that "origin" were a magic name for the default remote, but magic names would be a quite strange...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.