carl crott
carl crott

Reputation: 753

github "origin" deletion

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

Upvotes: 2

Views: 285

Answers (3)

user187676
user187676

Reputation:

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

Upvotes: 1

Gavin Mogan
Gavin Mogan

Reputation: 1517

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

Upvotes: 4

Jamie Wong
Jamie Wong

Reputation: 18350

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

Upvotes: 1

Related Questions