Error with sharing Android Studio project with GitHub

混江龙づ霸主 提交于 2020-01-06 19:53:07

问题


So when I try to share my project with GitHub through Android Studio, it says I have done it successfully, and a new repository is created, but when I open the repository, it is empty. I'm pretty inexperienced with GitHub, and I have spent hours trying different things and I can't get it to work, so if someone could help point me in the right direction, I would be extremely appreciative.


回答1:


Here are the steps for seamlessly working with Android Studio and github

  1. Create a new project in Android Studio.
  2. Create some files.
  3. Go to VCS -> Enable Version Control Integration. Select git
  4. Go to VCS -> Commit File and select all the files that you want to commit with a message.
  5. Go to VCS -> Push.
  6. Click on Define Remote.
  7. Enter the url for the already created repository in github.
  8. Click Push and enter the Github password.

P.S : I am using Android Studio version 1.5 If you are using some other version, then the steps can be a little different.




回答2:


After creating Repository, you have to push/commit the source files to the server. It seems you have not committed any file yet.

You can use some other Git clients like Source Tree with GitHub



来源:https://stackoverflow.com/questions/35000645/error-with-sharing-android-studio-project-with-github

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!