How to Synchronise Projects to Github with Android Studio

How do you synchronise projects to GitHub with Android Studio?

Open the project you want to push in Android Studio.

Click VCS -> Enable version Control Integration -> Git

There doesn't seem to be a way to add a remote through the GUI. So open Git Bash in the root of the project and do git remote add <remote_name> <remote_url>

Now when you do VCS -> Commit changes -> Commit & Push you should see your remote and everything should work through the GUI.


If you are getting the error: fatal: remote <remote_name> already exists that means you already added it. To see your remotes do git remote -v and git remote rm <remote_name> to remove.


See these pages for details:

http://www.jetbrains.com/idea/webhelp/using-git-integration.html

http://gitref.org/remotes/

How to add an Android Studio project to GitHub

  1. Sign up and create a GitHub account in www.github.com.
  2. Download git from https://git-scm.com/downloads and install it in your system.
  3. Open the project in android studio and go to File -> Settings -> Version Control -> Git.
  4. 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.
  5. Go to File -> Settings -> Version Control -> GitHub. Enter your email and password used to create GitHub account and click on OK button.
  6. Then go to VCS -> Import into Version Control -> Share Project on GitHub. Enter Repository name, Description and click Share button.
  7. In the next window check all files inorder to add files for initial commit and click OK.
  8. 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.

How to sync all files of an Android Project version 3.3 on Github?

enter image description here

1 .Select project Structure -> 2. Select(click) top project folder -> 3. Vcs- Git - add 4.Commit

Do a commit and push as regular .

Or in Git bash use command

git add --all

How to connect existing Android Studio project to existing Github repository

I would view this thread if you want to create a new project.

How do you synchronise projects to GitHub with Android Studio?

If this doesn't help then I would just delete your current(local) project and import from github.

http://teamtreehouse.com/library/android-tools/git/pulling-down-github-projects-to-android-studio

I would recommend staying with command line. It is great practice. View link below for more information.

https://softwareengineering.stackexchange.com/questions/173297/why-learn-git-when-there-are-gui-apps-for-github



Related Topics



Leave a reply



Submit