If you’re looking for more in-depth training, check out my ebook How to Use GitHub with Android Studio: A complete step-by-step guide to mastering the technology. Right click and select Git Bash (If you do not see this option, then first install Git for Windows ). When the Git bash screen appears, type.
. Sign up and create a GitHub account in www.github.com. Download git from 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'. If successful message is shown everything is ok, else navigate to git.exe from where you installed git and test again. Go to File - Settings - Version Control - GitHub.
Enter your email and password used to create GitHub account and click on OK button. Then go to VCS - Import into Version Control - Share Project on GitHub. Enter Repository name, Description and click Share button. In the next window check all files inorder to add files for initial commit and click OK. Now the project will be uploaded to the GitHub repository and when uploading is finished we will get a message in android studio showing 'Successfully shared project on GitHub'.
Click on the link provided in that message to go to GitHub repository. If you are using the latest version of Android studio. Then you don't need to install additional software for Git other than GIT itself - Steps.
Create an account on Github -. Install Git. Open your working project in Android studio.
GoTo - File - Settings - Version Controll - GitHub. Enter Login and Password which you have created just on Git Account and click on test. Once all credentials are true - it shows Success message.
O.w Invalid Cred. Now click on VCS in android studio menu bar.
Select Import into Version Control - Share Project on GitHub. The popup dialog will occure contains all your files with check mark, do ok or commit all.
At next time whenever you want to push your project just click on VCS - Commit Changes - Commmit and Push. You can find your project on your github now. First all of create a github account and project in github.
Go to root folder and follow steps. The most important thing we forgot here is ignoring file. Every time we run gradle or build it creates new files which are changeable from build to build and pc to pc.We do not want all the files from Android Studio to be added to Git. Files like generated code, binary files (executables) should not be added to Git (version control).So please use.gitignore file while uploading projects to github. It also reduces the size of project uploaded to server.
Go to root folder. git init. git add. Create.gitignore txt file in root folder. Place these content in file.iml.gradle /local.properties /.idea/workspace.xml /.idea/libraries.idea.DSStore /build /captures.externalNativeBuild. git remote add origin. git commit - m 'My First Commit'.
git push origin Note: As per suggestion from different developers, they always suggest to use git from command line. It is upto you, how you prefer it most.