Git simple tutorial

Source: Internet
Author: User
Tags version control system

GitIt is a free and open-source distributed version control system for agile and efficient processing of any small or large projects.

GitHub can host various git libraries and provide a web interface, but unlike other services such as SourceForge or Google code, gitHub's unique selling point is the simplicity of branch from another project. Contributing code to a project is very simple: first click the "fork" button of the project site, and then check out the code and add the modifications to the code library just separated, finally, we apply for code merging from the project owner through the built-in "pull request" mechanism. Someone has called GitHub the MySpace of code players.

 

The usage is as follows:

(1) Open the GitHub official website https://github.com/

(2) Register GitHub and select the free type (free type can be used to create unlimited projects, but the projects are open source and open on GitHub .)

 

(3) create a project (new repository)

1. Enter the project name (Chinese characters are recognized as the '-' symbol ).

2. Enter the project description.

3. Select the Project Creation type. (Public or private, public free, private ).

4. Select whether to generate the README file.

5. Create

 

(4) completed:

How can I synchronize the code hosted on GitHub on my computer? See the following (applicable to Windows ):

(1) download and install the GitHub management tool.

 

(2) generate the following shortcut:

 

(3) clone the project to the local device. (Clone in desktop click this button to bring up the local GitHub client and clone the project to your local computer)

For example, project: Test

 

(4) Open the project folder.

 

(5) create a file in the project folder

Open the GitHub management tool and Click Show.

The following figure is displayed:

 

Two new files have not been submitted for synchronization.

 

(6) submit and synchronize

Enter the title and description of this submission. If you do not want to submit the index. Bak file, you can only check the index. php file. Click Commit to master to submit the job.

The following occurs:

 

Unsynced changes is not synchronized. You need to click the sync synchronization button in the upper-right corner for synchronization. At this time, the files we submitted will be updated in the GitHub project repository.

 

Open the GitHub management tool:

Click the uncommitted Changes button. The index. Bak still appears in the unsubmitted file. To ignore the Bak file, perform the following operations:

Right-click the index. Bak file.

Ignore file ignores this file.

Ignore all. BAK files ignores all files ending with a Bak. (Ignore all files ending with the BAK ).

 

Click "uncommitted changes index. Bak" again, but a new. gitignore file will appear. This file is used by git to identify the configuration of files ignored. This file can be submitted and synchronized. In this way, if someone else synchronizes your project and submits the file to the project, the. Bak file will also be ignored.

 

Git simple tutorial

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.