Use Git and Github in Ubuntu

Source: Internet
Author: User
The main purpose of this article is to allow programmers who have just transferred from the SVN camp to the Git camp to quickly complete some simple Git operations. A simple understanding of Git's ideas and basic working principles can help you better further use Git. When learning Git, it is best not to compare Git concepts with other version control systems such as Subversion. Otherwise, it is easy to confuse the actual meaning of each operation. Git is a free, distributed version control tool, or a source code manager that emphasizes high speed.

The main purpose of this article is to allow programmers who have just transferred from the SVN camp to the Git camp to quickly complete some simple Git operations.

A simple understanding of Git's ideas and basic working principles can help you better further use Git. When learning Git, it is best not to compare Git concepts with other version control systems such as Subversion. Otherwise, it is easy to confuse the actual meaning of each operation.

GitIt is a free, distributed version control tool, or a source code management tool that emphasizes high speed. Each Git working directory is a completely independent code library with complete history and version tracking capabilities, independent of the network and central server.

When managing a project, Git has three local work areas: Git's local data directory, working directory, and temporary storage area. As shown in:

 

 

Therefore, for any file, there are only three States in Git: committed, modified, and staged ).

After a simple understanding of Git, the next thing to do is to install the Git client. The command is as follows:

sudo apt-get install git

However, after installing the Git client, if your code is not hosted on GitHub, you can skip setting the GitHub account content. Otherwise, you need to configure the GitHub account,GitHub provides SSH protocol support for the managed Git version library, that is, users can connect to the SSH server of GitHub through public key authentication. After settingYou can use the Git command to download and push code.

First you need to register an account at https://github.com:Click "Signup and Pricing" in the navigation bar, or click the big "Plans, Pricing and Signup" button on the homepage to go To the billing solution introduction and registration page.Open-source software hosting is the cornerstone of GitHub. GitHub is free of charge for hosting the version libraries (that is, non-private version libraries) of open-source projects. On the billing solution and registration page, the top is the open-source free hosting solution, as shown in.

Click the Create a free account button on the right to enter the registration page, as shown in.

Only the user name, email address, and password are required for registration. Note: Each email address can only be registered once. After the registration is completeThe newly registered account is automatically logged on. As shown in:

Click the Settings button in the upper-right corner to go to the settings page.Yes Setting up Git and SSH keys ". After the setting is successful, you can connect to the SSH server of GitHub through public key authentication.

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.