I am trying to use git in Android Studio. If I choose commit changes, it says that it has successfully committed the changed files but those changes do not appear on the GitHub. Instead, if I delete the repository from GitHub and choose Share Project on GitHub, it successfully creates a new repository and uploads the files into it. This means that the connection is fine. Also, I have checked the gitignore file, the java files are not in that list. What could be the problem?
Sign up and create a GitHub account in www.github.com. Download git from https://git-scm.com/downloads and install it in your system. Open the project in android studio and go to File -> Settings -> Version Control -> Git. Click on test button to test "path to Git executables".
Step 1: Go to VCS panel which is present on the top of Android Studio and click on it. After clicking select the “Enable Version Control Integration“. After clicking the Enable Version Control Integration a pop up will arise like following. Then select Git from the drop down menu and click OK.
You have to select "commit and push".
If you want to upload (push) the changes that you made, go to:
VCS -> Git -> PUSH
Only after "pushing", your changes will be uploaded to GitHub.
If you select "commit", your changes would remain local.
For my case it's a different - I uncheck Perform code analysis in commit changes dialog and it worked. Hope it will help some one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With