The advantage of git is not to say more. The only problem that prevents the novice from experiencing it is that the threshold is too high and the script looks like a heavenly book,
This article focuses on how to use Git for versioning in Android studio, as well as a very simple operation like TFS.
A few months to use down, what I do every day is to start work, ALT + DOWN ARROW keys, pull the data from the service end; After the work is done, ALT + the UP ARROW key to submit the code to the server. In these two steps, version management is completed.
So, with this new and illustrated article for beginners, step by step, you can complete the project to git integration.
(Hint: Introduction-oriented article for the novice, so the steps are meticulous and complex, dry, very little, the birds have skipped yo ~)
Put a i in [email protected] Home page Everyone look, really easy to use Oh!
Preparatory work
OK, since there is no git knowledge, no scripting commands, it's natural that the software is doing this for us.
First of all, we need to install Git on the machine, configure the environment
In addition to Android studio, we also need sourcetree to help us complete the first steps of cloning empty projects Oh ~
1: Project Integration git management
Tips: Because of the speed and stability issues, this article does not use GitHub to host the code, but the adoption of domestic [email protected] Oh, stable and efficient
1.1: Register your account on Gitoschina
Enter http://git.oschina.net/to register and, when completed, start creating projects such as (in this case, HelloWorld)
1.2: After you finish creating the project, copy the Git address
1.3: Open the Sourcetree and follow the diagram to clone the Git project to a local
1.4: Copy the existing project code with the folder for version management
1.5: Start Android studio, open Project, directory select 1.4 steps
1.6: Switch to the root directory of the Project tab, locate the. Gitignore, enter the folder relative address that is not included in the watch (be sure to enter/.idea/misc.xml)
. Gradle/local.properties/.idea/workspace.xml/.idea/Libraries/.idea/ Misc.xml.DS_Store/build/captures
1.7: Incorporate the project file into the GIT monitoring object and follow the action
1.8: Submit the local code to the GIT platform, this article uses the button, you can also refer to my keyboard shortcut
1.9: End of Push chapter
Refresh my git Project home page, the code has been pushed past oh ~ My first git management project succeeded Oh ~ Gee, why a watch it, haha
2: Manage Project 2.1 with Git: Clone from an existing Git project to a local
2.2: Get the change code from the server
2.3: Push modify code to server
Same 1.8
End of article:
A good thing is never too late to be used. Git really deserves your time to get to know him, use him, learn more about scripts, inner steps, a good learning article
The test git project address created in this tutorial
Good night, everyone.
"Android Studio" 0 git knowledge, 0 script commands, instantly experience git version management charm!