Pranav Bhoraskar
Pranav Bhoraskar

Reputation: 135

Github- Cloning a private repo to a public repo

I am currently making an android project under the supervision of my professor who has given me access to the private repo he created for the project. I was wondering whether I can make another repo(public) so that the project can be reflected onto my profile and any one can see that?

Also is there any way to sync these two repos so that if I ppush to one, other automatically gets updated?

I am new at github and it would be a great help to me.Thank you in advance.

Upvotes: 1

Views: 1046

Answers (2)

SYANiDE
SYANiDE

Reputation: 187

You can fork the repo, and any changes you make can be kept separate from the main branch. As for sync, it's up to the owner of each repository to determine if they want to merge branches and mainline any changes. I hope that helps clear some of the confusion.

Of course, this is tailored to your circumstance. It is possible to syncronize two repositories, however that's a job for automation or manual concentration.

If you insist on the "syncing multiple repositories" aspect, take a look here: https://blog.afoolishmanifesto.com/posts/syncing-with-multiple-git-repos/

Upvotes: 0

Chris Gomez
Chris Gomez

Reputation: 6794

You only need to add the other repo as remote to your client, and push to it, in the terminal you can do something like this:

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

and then

git push public master

if you are using some kind of UI for git you can add the remote that way and push.

Upvotes: 3

Related Questions