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