user_1234
user_1234

Reputation: 761

How to push same code in different repositories on github using gitbash

I have created repository xyz in github and push the code using

git remote add origin [email protected]:user/ci.git

then

git push -u origin master 

Now code uploaded to ci directory successfully ,then I created another directory abc in github and used the command

git remote add origin [email protected]:user/abc.git 

but got error

error: remote origin already exists.

I didn't understand why I can't make another copy to different repository in github

Upvotes: 0

Views: 115

Answers (1)

Dmitry Barskov
Dmitry Barskov

Reputation: 1257

You can, but you must give another name to your remote, you can call it abc for example.

git remote add abc [email protected]:user/abc.git

# then
git push -u abc master

Upvotes: 1

Related Questions