Android Deep Explore HAL with driver development
Chapter III
Getting started with Git
Reading notes
Git is the software that manages the source code.
First, install Git
# apt-get Install git
# apt-get Install Git-doc git-emall Git-gui GITK
Use the following command to control Git:
# Apt-get Install Git-core
# apt-get Install Git-doc git-svn git-email Git-gui gitk
Second, view Git documentation
To view the git-checkout command Documentation:
# git Help git-checkout
View heml format documents:
# git help-w git-checkout
III. submission and acquisition of source code
1. Create an empty repository locally using the git clone command:
# Mkdir-p/demo/helloworld-git
# Cd/demo/helloworld-git
# git Init
2. Submit the file to the local repository:git commit
# Cd/demo/helloworld-git
# echo "HelloWorld" >helloworld.txt
# git Add helloworld.txt
# git commit-m ' helloworld-master '
-M command line arguments are the comments of this submission;
3. Create a local branch:git branch
# git Branch view local branch
# git branch new-branch new branch
# git branch-d new-branch Delete the newly created branch
4. Switch local branch:git checkout
# git checkout new-branch to switch the local branch to new-branch
Modify the contents of the Helloworld.txt file and resubmit it to the local repository
# echo ' Hello World ' >helloworld.txt
# git Add helloworld.txt
# git commint-m helloworld-new-branch
5. Create an open source project on GitHub
6. Upload the source code to GitHub:git push
Backup before uploading
# ssh-keygen-t rsa-c "[email protected]"
Before uploading the file, you need to use the git config command to set the name and emailto upload.
# git cinfig--global user.name "Your name"
# git config--global user.email [email protected]
Use the git remove command to set the URI of the HelloWorld project on GitHub .
# git remove add orign [email protected]:androidguy/helloworld.git
7. download source codefrom GitHub :git clone
Use the next command to download the entire project
# git clone [email protected]:androidguy/helloworld.git
Iv. Summary
Learn about Git usage.
http://www.cnblogs.com/qwhw/
Android Deep explore HAL and Driver Development Chapter III