Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I connect GitHub Enterprise in Android Studio? [duplicate]

I have a project in Android Studio. I want to add that project to a GitHub repository using android studio. How can I do that?

like image 794
Tony Baby Avatar asked Aug 14 '26 11:08

Tony Baby


2 Answers

  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.
like image 59
Tony Baby Avatar answered Aug 16 '26 08:08

Tony Baby


You need to create the project on GitHub first. After that go to the project directory and run in terminal:

git init
git remote add origin https://github.com/xxx/yyy.git
git add .
git commit -m "first commit"
git push -u origin master
like image 35
Oleg Khalidov Avatar answered Aug 16 '26 08:08

Oleg Khalidov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!