Android Studio Add New Android Project as Branch to Existing Github Repo

October 29, 2021

Create New Project in Android Studio

Click VCS -> Enable Version Control Integration.

Click File -> New -> Project From Version Control.

  • Click Github and click Use Token (I bump into some issues using Log In via Github)

  • Click Generate (which open up a Github page to generate the token), copy and paste the token then click Login.

Click Git -> Branches. (on click bottom-right corner master branch icon), and click New Branch (if New Branch is disable, you need to commit to existing master first, make sure only commit locally and don’t push to github)

After create new branch, then we need to push the branch to github. Click Push and setup the remote github url. Check for the new branch at your github page.

NOTE: Now we are working on a branch and can push remotely, yet our local master/main is a still a new project which differ from our remote repo. I left the setup as it is, and will figure it out later when I need to merge/replace the master/main with the branch.

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.