How to push Android Project to existing private empty repository in github with Android Studio?

后端 未结 3 454
我寻月下人不归
我寻月下人不归 2021-02-05 16:00

I am trying to push android project to private empty repo with android studio . But I cannot find simple solution. How can I do this ?

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 16:37

    If you are pushing to a private repo in a local location ie. a private server.:

    • Assuming you have set up local git repository, cd into the remote location and clone your local repository with git clone 'path to local repo'

    • cloning will set the local repo as a remote, so we have to remove that with git remote remove origin

    • make the remote repo bare with git config --bool core.bare true

    • Then in your local repository add the remote with git remote add origin 'location to remote git repo'

    Now you should be able to push to remote in Android studio.

提交回复
热议问题