1. What is git?
Git is an open source distributed version control system for efficient, high-speed processing of project versioning from very small to very large. Git is an open source version control software developed by Linus Torvalds to help manage the development of the Linux kernel.
2, the installation of Git.
# apt-get Install git
#apt-get Install Git-doc git-svn git-email Git-gui gitk
Under Linux, you can use the Man command to view the help document for the specified command.
#git Help <sub-command>//view specified document in text form
#git help Git-checkout//query Git-checkout documents
#git help-w git-checkout//view documents in HTML format
3, the source code to submit access.
Create an empty local repository
# mkdir-p/demo/helloworld-git//Create a working directory of open source projects
# Cd/demo/helloworld-git//Enter working directory
Execute ' git init ' command
. # Ls-al//display. Git directory (hidden directory)
. Submit the file to the local repository
# Cd/demo/helloworld-git
# echo "HelloWorld" > Helloworld.txt//Create a file in the directory
# git Add helloworld.txt//Add files to the index of the local repository
# git commit-m ' helloworld-master '//Submit files to the repository
# git Log//display log information
# git checkout helloworld.txt//immediately revert to the state of the most recent commit
. Create a local branch
# git branch//See which branches are in the current repository
# git branch new-branch//Create a new branch
# git branch-d new-branch//Delete a newly created branch
Switch to local branch
# git checkout new-branch//Switch the current local branch to New-branch
# git Add helloworld.txt
#git commit-m helloworld-new-branch//Modify file contents and submit to local repository
Create an open source project on GitHub
Register on the website create a user, login to the homepage, create a new project through "New Repository"
Upload source code to GitHub
Download source code from GitHub
# git clone [email protected]:androidguy/helloworld.git//Download the entire project
# Git Pull Origin master//Get the latest content from a branch
http://www.cnblogs.com/caoyutao/
Android Deep Explore--hal and Driver Development----Chapter III reading notes