Adding a version number management tool like Git in eclipse requires you to add the plugin yourself. And personally think not good to use, in as has been to us to integrate well, we just need to configure the OK. Today we will talk about how to configure and use the key points.
1. Installing Git/cvs
First step you need to install GIT/CVS and other version number management tools. This please self-Baidu
2. Create a new local empty warehouse
Create a new warehouse called Gittest
The warehouse is empty now, nothing at all.
Locate the path, and then copy the path (this step is important)
3. New as Project
The project is created. At this point we can see the hint that as prompts us to configure the repository, and then we configure GIT to be OK.
4. Configure Git
First we observe that all the files are in the normal color [white]
OK, let's start by configuring Git. See what's changed. First click Set button
Let's configure the Git path First, then click Testbutton
Assume that a dialog box appears. Indicates a successful configuration
Next we return. The tool used to set version number management for a project. ChooseVersion Control
We click <none>
and then selectGit
Then click Apply and then click OK. Now let's look at the color of the file
We are now back to see the changes to the files in the Git visualizer and .gitignore
have already joined us.
Do you know what red means now? We now continue with the add file. Let's switch to Project view first.
Then right-click and choose Git. Then select Add
At this point, all our files are green, so we've added them in.
All right, let's finish the Add. Now we create a new AddTest.java
file, we will mention a demo like the following, ask if we add, choose Yes. If you don't want to be prompted with a new file, tick Remember,don ‘t ask again
OK
5. Uploading Code
Assuming git is configured, we have such two icons on the toolbar. One is to upload one that is downloaded (using shortcut keys also can. The mouse is placed on the button)
After we clicked on the upload button. Will pop up such an interface, fill in descriptive narrative. You can choose Commit. or commit and push
Sometimes, our code will have some warning, when the submission will prompt us, we choose to submit the door OK. You can also see
Finally we click Push
6. Drop-Down code
I'm now changing my code on GitHub. Other members of the simulation team changed the same file
Then I click the drop-down code button
A dialog box is prompted. We must choose Merga. Otherwise there will be a very big problem. Every time the drop-down code prompts you to be very troublesome. You can chooseDo not show this dialog in the future
This will pop up an interface that prompts us to drop the file and double-click the file to navigate to the location where the file was changed. This is actually the third change after project joins Git
Look at the code we just changed on GitHub.
Change the color of the file to ink blue, and change the place can be displayed
7. Version number Control Panel
We saw it just now. The third change after project has been configured for an item. Just a few more version number Control Panel, we first look at a tab [local changes], look at the name to know what the local changes, here are listed we add/change the file
Take a look at the second choice Card [log], the same name is the meaning of the log. Here we can see our submission record and the corresponding changes in the document.
We are also able to make a deletion, such as submitting a name, branch, submitter, date, which I screened here: including INIT, I submitted, within 24 hours of
Last two tabs I'm going to cut the crap. One is the console [console], one is the specific information that pops up when we drop the code just now
8. The last Change
Is that we show our current branch, I am currently the master branch
9. Configure your GitHub account
Click Settings First, then click GitHub and enter your account password
then click Testbutton. Occurs such as the following instructions are configured successfully
10. Cloning a project from GitHub
Choose GitHub
I'm cloning my [Magnum adapter] here as a demo sample, enter the GitHub address. Click Clonebutton
Select Yes
And then the project is clone complete.
To configure version number management for a project
11. Configuration of other version number management tools
The other is also the version number management tool and Git almost the same, the configuration of the place. For example, the following:
Today's blog is here, we summarize. Several colors of the file and the corresponding state. Welcome Top Sticker
Color |
Status |
Red |
No new files for add |
Green |
Add, no commit file |
Ink Blue |
Files that have been changed |
Interested children's shoes can follow my blog, my column will continue to update the Android Studio authoritative tutorial, as well as I/O assembly on the NDK configuration and compilation, I will also share to everyone.
And I received an invitation from CSND's instructor, and later I'll record the use of these Android studio videos.
/** * -------------- * 欢迎转载 | 转载请注明 * -------------- * 假设对你有帮助。请点击|顶| * -------------- * 请保持谦逊 | 你会走的更远 * -------------- * @author zsl * @github https://github.com/yy1300326388 * @blog http://blog.csdn.net/yy1300326388 */
[Android Studio authoritative tutorial]as Configuring a powerful version number management system (GIT, SVN, etc.)