Hi guys in this tutorial we will see how to create a github repository from Android Studio. For this purpose we will not be required to open command line or the web browser. Entire process from repository creation to your first push will be completely carried out on your android studio IDE, provided that you already have git installed on your pc and that you have a valid github account.
It significantly reduces the hassle and also saves a lot of time since we won't be spending much time on writing the commands or be going to the github website to create new repository. All the hassles will be handled by android studio.
So Android Studio will help us in creating the repository, adding all the files for commit, commit the files to be pushed and finally push the project to the github repository created.
Before you begin :
1) Download and install git if you haven't already done.
for mac OS : https://git-scm.com/download/mac
for windows : https://git-scm.com/download/win
2) go here and create a github account >> https://github.com/
Now follow the below steps to create a github repository in the above created account from android studio :
1) First of all open up android studio and create a brand new android studio project. Once the project has finished the building process, goto the VCS option on the top menu as shown below
VCS option appears in the top menu |
2) From the above VCS option navigate VCS > Import into version control > Share project on Github like shown in the image below
Share project on Github |
Click on "Create API Token" |
Login here with github credentilas |
Generates token on successfully login |
5) In the above login screen click the checkbox "Save Credentials" so that we won't have to do this process each time we try create a repository. Now click on login button again. You will be successfully logged in and taken to the following screen
Entering repository details |
6) As soon as we hit share button, we will be asked what all files are needed to be added to git, since this is our first commit we can select all files like shown below, doing which will make all your files ready for commit
Initial commit to git |
As shown above select all files (already selected by default) and enter a commit message. Now click OK button. As soon as we hit OK button we can see that all the files get committed and finally pushed to the remote github repository, you will also be presented with a link to your repository at the bottom of android studio like shown below
Github repository created |
Github repository opened in browser |
No comments:
Post a Comment