Steps for submitting (updating) The AndroidStudio project to github

Source: Internet
Author: User

Steps for submitting (updating) The AndroidStudio project to github

Sometimes we want to release the project to github during the project development process using studio. In the past, we used to submit the project in a troublesome way (cmd, recently, it was found that studio actually comes with this function and can finally get rid of the command line.

Because I have not done any in-depth research, I will first share the steps to upload my project to github through studio.

Two related concepts: git and github

Git is an open-source distributed version control system for efficient and high-speed processing of project version management from very small to very large. Git is an open-source version control software developed by Linus Torvalds to help manage Linux kernel development. The biggest difference between distributed and centralized systems is that developers can submit data locally. Each developer copies a complete git repository on a local machine by cloning (Git clone.


Github, as an open-source code library and version control system, is a website that provides git services to users. in this way, you can use the git service they provide without having to deploy the git system and register an account directly. GitHub can host various git libraries and provide a web interface. GitHub's unique selling point is the simplicity of branch from another project. Contributing code to a project is very simple: first click the "fork" button of the project site, and then check out the code and add the modifications to the code library just separated, finally, we apply for code merging from the project owner through the built-in "pull request" mechanism.

Preparation

Install Androidstudio and create a new project;

Install the git version control system, such as Git GUI;

Register an account on the github website.

Procedure

1. git configuration of studio;

After installing git, start Androidstudio and open the following path File> Settings> Version Control (expand)> git

Enter the Git Path you have installed in the input box after Path to git executable, as shown in:

Click the "test" button. If the Git executed successfully dialog box is displayed, the configuration is successful, and the git version you have installed is displayed, as shown in.

2. Configure github logon information;

Open File> Settings> Version Control> GitHub in the following path, as shown in.

Enter the following information:

Host: github.com

Login: Your github account name

Password: Your github account Password

After entering the information, click the test button. If the following dialog box appears, the configuration is successful.

3. Upload the project to github

Open the Project you want to upload, and choose VCS> Import into Version Control> Share Project on GitHub from the top menu, as shown in:

If you submit the project for the first time, the following dialog box appears, prompting you that this is a new repository (repo). You can customize the repo name and add description.

After entering the information, click the share button. If your project is normal, the following page will appear:

The classes to be submitted and various resource configuration files are listed here. Click OK.

Enter your Master password and click OK. If the job is submitted successfully, related information is displayed in the upper right corner of studio.

Open your github website. In your repositories, you will see the name of the project you just submitted. Click it to view the complete project submission. The submission is complete.

Project update

When a module or module is added to a project to update the github project, it is actually quite simple.

1. If a new class is added to your project, you will be prompted if you want to add it to git when creating the class, as shown in

If you select yes, the class will be added to git, and the color of the class itself will change (under the Darcula topic, the color will change from normal white to green)

Right-click the class and choose Git> COmmit File.... The following dialog box is displayed.

Enter the commit message and click the Commit button. The following warning may appear. Ignore the warning and click Commit.

 

Right-click again-> Git-> Repository-> Push, as shown in

Click Push to display the following dialog box. Click Pust.

Open the source code of the project on your github, and you will find that the newly added class has appeared.

2. If a class in your project has been modified, You need to submit it again;

Right-click the class and choose Git-Add.

Does this change? Actually not. In this step, the class is actually added to git;

The subsequent steps are the same as the operations for adding classes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.