Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use multiple repositories in Android Studio with GitHub

Tags:

android

github

I have 2 to 3 repositories in my GitHub account.First time i have done to push the project in first repository but now i want to push the project another repository from Android studio.How can i do this.Thanks .

like image 265
p. ld Avatar asked Oct 20 '25 04:10

p. ld


2 Answers

The pure git way, would be to go to the root folder of your Git repo and add another remote.

cd /path/to/git/repo
git remote add repo2 https://github.com/<username>/<repo2>
git push --all repo2

But you can manually specify another GitHub repo url with:

 VCS-> Import into Version control -> Share Project on GitHub.
like image 65
VonC Avatar answered Oct 22 '25 18:10

VonC


Android Studio 4.1.1

1: Go to VCS -> Git -> Remotes -> Add your new remote.

2: VCS -> Git -> Push -> Click the underscored 'origin' (it appears as link), select your new remote and you will see the commits as well as be able to push to it.

like image 34
realtimez Avatar answered Oct 22 '25 19:10

realtimez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!