Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio not committing to GitHub

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?

like image 790
Himanshu Arora Avatar asked Mar 07 '16 15:03

Himanshu Arora


People also ask

Does GitHub work with Android Studio?

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".

How do I push changes from android project to GitHub?

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.


2 Answers

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.

like image 72
W0rmH0le Avatar answered Oct 19 '22 03:10

W0rmH0le


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.

like image 13
Anirban Avatar answered Oct 19 '22 04:10

Anirban