Android Deep explore HAL and Driver Development Chapter III

Source: Internet
Author: User

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

Related Article

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.