Android Driver Development (iii)----GIT

Source: Internet
Author: User

git is a software that manages source code, can create repositories, submit source code, create branches, and so on.

In creating a repository, you need to know that any version management software must have a repository, when using git to manage source code, you can not network, then git directly with the local repository, when the network, and then synchronize the local repository to the remote repository. Local repository access does not require any permissions, but to modify the source code in the managed server, you must use the git clone command to create a local version of the same local repository as the remote version, which also protects the source code in the managed server.

When multiple people complete a source code project, the person participating in the development creates a branch for each modification, which avoids the impact of the new project on the correct code snippet that has been tested.

Common git commands:

Git init create local repository

Git commit commits the file to the local repository

Get Branch Create local branch

git Checkout switch local branch

git push upload source code to Gihub

git clone download source code from Gihub

Git Co discards workspace modification

Git add commits the work file modification to the local staging area

git rm delete files from repository

Git reset restore from staging area to working file

Git ci modifies the last commit record

Git revert restores the state of a commit, and the recovery action itself also creates a commit object

Android Driver Development (iii)----GIT

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.