Getting Started with Git

Source: Internet
Author: User

Getting Started with Git

Linux is designed with a file system expert and kernel Designer's perspective, and its unique design gives git exceptional performance and optimized storage capabilities.

Install Git

Ubuntu Linux 10.10 or later

# apt-get Install git

#apt-get Install git-svn git-email Git-gui GITK

Ubuntu Linux 10.04 or lower version

# Apt-get Install Git-core

#apt-get Install Git-doc git-svn git-email Git-gui gitk

RHEL Fedora CentOS

# apt-get Install git

#apt-get Install Git-doc git-svn git-email Git-gui gitk

View git documentation

Under Linux, you can use the Man command to view the Help documentation for the command.

Submission and acquisition of source code

    1. To create a repository: Git init

The Git repository is divided into local and remote repositories, which can be disconnected from the Internet when using git to manage source code versions, using the local repository, connecting the local repository to the remote repository when connecting to the Internet, and not requiring any permissions to access the local repository. Anyone who wants to modify the source code in the GIT source managed server must use the git clone command to create a local repository that is identical to the remote repository.

You need to use GIT init to create an empty repository locally.

2. Submit file to local repository: git commit

Once the files in the working directory are submitted to the local repository, it is no longer feared that the source code will be mistakenly or incorrectly changed.

3. Create a local branch: Git branch

4. Switch local branch: Git checkout

5. Create an open source project on GitHub

6. Uploading source code to github:git push

7. Download source code from github: Git clone

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.