Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which way is correct when I integrate GitHub to my Android Studio 3.3.1 project?

I hope to use GitHub in my Android Studio 3.3.1 project. I google some ways, I find the ways divide into two way.

Way 1: Such as https://medium.com/code-yoga/how-to-link-android-studio-with-github-312037a13b99

   It need  VCS > Import into Version Control > Share project on Github

Way2 : Such as https://www.londonappdeveloper.com/how-to-use-git-hub-with-android-studio/

   It need VCS > Import into Version Control > Create Git Repository.

What are different between Way 1 and Way2 ?

What are different between Share project on Github and Create Git Repository and Other operations ?

Way 1 is very simple, but I don't know if it's correct.

like image 517
HelloCW Avatar asked Feb 11 '19 06:02

HelloCW


People also ask

How do I push a new Android project to GitHub?

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.

How do I link my GitHub to my Android Studio?

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.

Does Android Studio have GitHub integration?

With Android Studio, you don't need to use the terminal to contribute to an Android project on GitHub. It has native integration with git and GitHub to allow most actions via the Android Studio UI. When you open Android Studio, it offers the option to open a project from version control.


1 Answers

In the 2nd link you posted : the author guides you through the following steps

  1. create an empty git repo on github throught github's web GUI
  2. create a project and an empty repo on your local machine
  3. link your local repo with the remote repo on github (through a cli command : git remote add ...)

In the 1st link you posted :

steps 1. and 3. are managed through the IDE, when the author describes the step "3. Share on Github"


a note about the "private" flag : when following the walkthrough of the 2nd article, you can select "Private" in github's GUI when you create the empty repository on github.

like image 98
LeGEC Avatar answered Oct 19 '22 10:10

LeGEC