Android Deep Explore--hal and Driver Development----Chapter III reading notes

Source: Internet
Author: User
Tags version control system

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

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.