问题
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
- Create a new project in Android Studio.
- Create some files.
- Go to VCS -> Enable Version Control Integration. Select git
- Go to VCS -> Commit File and select all the files that you want to commit with a message.
- Go to VCS -> Push.
- Click on Define Remote.
- Enter the url for the already created repository in github.
- 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