Android Deep Exploration (Vol. 1) HAL and Driver Development--Reading notes (chapter III)

Source: Internet
Author: User

GIT-related knowledge

L GIT Installation

L View git documentation

Query the Help document for the Git-checkout command #man git-checkout

Querying the documentation for the git-checkout command #git help Git-checkout

View HTML-formatted documents git help–w git-checkout

Basic usage of Git

    1. Create repository git init

is divided into the local repository and the remote repository, when using git to manage the source code version, you can communicate directly with the local repository without connecting to the Internet,git, and then communicate with the remote repository after connecting to the Internet.

First, create a working directory of open source projects and enter

#mkdir –p/demo/helloworld-git

#cd/demo/helloworld-git

#git Init

    1. Submit a file to the local repository git commit

#cd/demo/helloworld-git

#echo "HelloWorld" >helloworld.txt

#git add Helloworld.txt submit to a text library

#git commit–m ' Helloworld-master '

Log messages are displayed #git log

    1. Create a local branch git branch

#git Branch understand which local branches the yourselves repository contains

#git Branch New-branch to create a new branch

#git branch–d new-branch Delete the branch you just established (all changes made in the branch will disappear)

    1. Toggle local branch Git checkout

Local branches are designed to isolate changes in different parts of the main branch, and the git checkout command can be used to switch between different local branches.

# git checkout new-branch to switch the current local branch to New-branch

#echo ' Hello World ' >helloworld.txt

#git Add Helloworld.txt

#git commit–m Helloworld-new-branch Modify the contents of the file and resubmit it to the local repository

    1. Upload source code to github git push

GitHub upload requires SSH checksum, so you need to generate a key file and a public key file

#ssh-keygen–t rsa–c [email protected]

Then set the key to detect if the key setting is correct

#ssh –T [email protected]

Add RSA identity to proxy authentication

#ssh-add

Set uploader name and email

#git config–global user.name "YOUR name"

#git Config–global user.email YOUR Email

Set the URI on GitHub

#git REMOTR Add origin [email protected]:androidguy/helloworld.git

Uploading files from the local repository to GitHub

#git Push–u Origin Master

View all Branches

#git Branch–a

Android Deep Exploration (Vol. 1) HAL and Driver Development--Reading notes (chapter III)

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.