Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add another repository in git?

Tags:

git

github

I have a GitHub repository that I push my data in it. I would like to add another remote repository to push my data at the same time.

For example;

git push origin master
git push {another origin} master

Anybody know if it is possible?

like image 449
Cagri Avatar asked Oct 07 '15 08:10

Cagri


1 Answers

You can add an additional remote using the following syntax:

git remote add remotename https://github.com/user/repo.git

You can then push to it (assuming you have the permissions) using:

git push remotename remotebranch
like image 86
Mureinik Avatar answered Sep 28 '22 16:09

Mureinik