Chapter III Git Getting Started with
Experience
Learn android in Depth (Vol. 1) HAL and Driver Development Chapter III Git Getting started, first I have a certain understanding of Git is a version control system. The official explanation is that versioning (Revision control) is a software engineering technique. Second, I mastered Git's use of the process.
First step: Create a new branch
First, each time you develop a new feature, you should create a separate branch
# get the latest skeleton code
$ git Checkout Master
$ git pull
# Create a new development branch Myfeature
$ git checkout-b myfeature
Step two: Commit the Branch commit
After the branch is modified, you can commit the commit.
Step Three: Compose submission information
When committing a commit, you must give a complete summary of the submitted information,
Fourth step: synchronizing with the backbone
During the development of the branch, you should always keep in sync with the trunk.
$ GIT fetch origin
$ git rebase origin/master
Fifth Step: Merge Commit
After the branch development is complete, it is possible to have a bunch of commits, but when merging into the trunk, it is often desirable to have only one (or up to two or three) commits, which is not only clear, but also manageable.
Sixth step: push to remote repository
Once the commit is merged, you can push the current branch to the remote repository.
$ git push--force origin myfeature
The git push command has to add the Force parameter, because after rebase, the branch history changes, and the remote branch is not necessarily compatible, it is possible to push (see here).
Seventh step: Issue Pull request
After committing to the remote repository, you can issue a pull request to the master branch and then request someone else to code review, confirming that it can be merged into master.
http://www.cnblogs.com/yun123456/
Chapter III Introduction to GIT usage experience