Chapter III Getting Started with Git

Source: Internet
Author: User

Chapter III

Since the Linux kernel version is very diverse, there may be hundreds of versions, and if you provide an installation package, you will need to generate a binary installation package for each kernel version of Linux, so as to reduce the size of the release package, Many of the software under Linux is not provided directly in the binary form of the installation package, but instead provides the source code directly. Now that the source code is involved, the source code needs to be managed, and theLinux kernel code uses git, written by the parent Linus of Linux, for source code control. Many of the source code involved in learning about Android and the Linux kernel and driving the development process is managed by Git.

3.1 installing Git

If Ubuntu 10.10 and later, you can install version control system git, if ubuntu 10.04 and the following version will be used for version control git package to git-core.

3.2 viewing Git documents

1. View the help document for the specified command, using the (MAN subcommand ) to view

2. View the specified document as text and use (Git help sub-command) to view

3.3 source code submission and acquisition

To create a repository : Git init

Commit the file to the local repository : Git commits a file in the working directory to the local version of the repository, it is no longer afraid of the source code mistakenly deleted and mistakenly changed.

Create a local branch : see which local branches the current repository contains git brance; Create a new branch : Git branch new-branch

Switch local branch : Git checkout

Submit and get source code to a remote server : Create an open source project on GitHub , upload source code to github:git push, download source from GitHub : Git clone.

Chapter III Getting Started with Git

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.