[Android Studio authoritative tutorial] configure a powerful version management system (Git, SVN, etc.) and androidsvn in

Source: Internet
Author: User

[Android Studio authoritative tutorial] configure a powerful version management system (Git, SVN, etc.) and androidsvn in

To add version management tools such AS Git to Eclipse, you need to add plug-ins by yourself. I personally think it is not easy to use. We have already integrated the plug-ins for us in AS. We just need to configure the plug-ins, today we will talk about how to configure and use the key points.

1. Install Git/CVS

First, you need to install version management tools such as Git/CVS.

2. Create a local empty warehouse

Create a warehouse named GitTest

The warehouse is empty.

Locate the path and copy the path (this step is important)

3. Create an AS Project

After the project is created, we can see the AS prompt for configuring the repository. Now we can configure git and it will be OK.

4. Configure Git

First, we can observe that all files are in normal color [White].

Okay, let's first configure git to see if there are any changes. First, click the Settings button.

Configure the git path and click the Test button.

If a dialog box is displayed, the configuration is successful.

Next, we will return, set the tool for version management for the project, and selectVersion Control

Click<none>Then selectGit

Click Apply and then click OK. Now let's look at the file color.

Now let's return to see the file changes in the Git visualization tool,.gitignoreAdded to us

Do you know what red means? Now let's continue to Add the file. we will switch to the Project view first.

Right-click, select Git, and then select Add

Now all our files are green, which means we have added them.

Okay, let's finish adding all. Now we createAddTest.javaThe following message is displayed. If you want to Add a file, select Yes. If you do not want to prompt every time you add a new file, selectRemember,don 't ask againOK.

5. upload code

If you have configured git, we will have two icons in the toolbar. One is to upload and the other is to download (you can also use the shortcut key and place the cursor on the button)

After we click the upload button, this interface will pop up and enter the description. You can choose commit or commit and push.

Sometimes, our code has some warnings. When submitting the code, we will be prompted. If you choose to submit the code, you can check it.

Finally, click Push.

6. drop-down code

Now I am modifying my code on github. Other members of the simulation team have modified the same file.

Then I click the drop-down code button.

A dialog box is displayed, so we must select Merga. Otherwise, there will be a big problem. Every time the Code is pulled down, it will prompt that it will be very troublesome. You can chooseDo not show this dialog in the future

This page is displayed, prompting you to drop down the files and double-click the files to locate the modified files. This is actually the third change after git is added to the project.

Let's take a look at the code we modified on github.

The color of the modified file changes to mercury blue, and the modified location can be displayed.

7. Version Control Panel

As we saw just now, the third change after the project is configured is to add a version control panel. Let's first check a tab [Local Changes]. check the name to see what changes are made locally. The added/modified files are listed here.

Let's take a look at the second choice card [Log]. The same name means the Log. Here we can see our submission records and the corresponding modified files.

We can also delete and select, for example, the submission name, branch, Submitter, and date. Here we filter: including init, I submitted, within 24 hours

I will not talk about the last two tabs. One is the Console [Console], and the other is the details of the changes popped up when we pull down the code.

8. Last change

That is, we show our current Branch. I am a Master branch.

9. configure a github account

Click Settings, click github, and enter the account and password.

Click the Test button. The following message indicates that the configuration is successful.

10. clone a project from github

Select github

Here, I will Clone my [universal Adapter] as an example. Enter the github address and click the Clone button.

Select Yes

The project is cloned.

Configure version management for the project

11. configuration of other version management tools

Other version management tools are similar to git. The configuration is as follows:

Today's blog is here. Let's summarize the several colors and corresponding states of the file.

Color Status
Red No new file added
Green No commit file added
Merblue Modified files

If you are interested, follow my Blog. My column will continue to update the Android Studio authoritative tutorial and the NDK configuration and compilation at the 2015 I/O conference, I will share it with you all.
I also received an invitation from CSND's lecturer. Later I will record these Android Studio tutorials as videos.

/*** -------------- * Welcome to reprint | reprinted please note * -------------- * if it is helpful to you, please click | top | * -------------- * Please keep humble | you will go further * -------------- * @ author zsl * @ github https://github.com/yy1300326388 * @ blog http://blog.csdn.net/yy1300326388 */

Related Article

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.