The use of Git

Source: Internet
Author: User
Tags version control system

Front-End Pen questions

Git Hub Home steps:

1. First to register an account

2. Complete the registration, go to the GitHub platform, click New repositories ( a green button ) to Create an item ( You can also add to an existing project )

3. Create a new project, enter the project name (Repository name) , Enter a description of the project (Description (Optional)),

Click public and Initialize this respository with a README and click the second button to select the Open source Protocol (GPL v2), then click Create Repository to complete the creation immediately.

4. Install the git client

5. After the client installation is complete, the final step is required, and in the command, enter:

$git config--global user.name "your name"

$git config--global user.email "[email protected]"

Command Description:

Because git is a distributed version control system, every machine has to expose itself. Your name and your email address. Note:the --global parameter of thegit config command , using this parameter, represents all of your git on this machine The repository will use this configuration, and of course you can use different usernames and email addresses for different warehouses .

6.pwd can display the current directory,

7. $git init: create a git repository where you can see a more hidden . Git directory, which is used to give git track repository-managed.

TIP:

Children's shoes using Windows should pay special attention to:

Never Edit any text file with a notepad that comes with Windows. The reason is that the Microsoft Development Notepad team used a very retarded behavior to save UTF-8 encoded files, and they were smart to add a 0XEFBBBF(hex) characters, you will encounter a lot of incredible problems, for example, the first line of the page may show a "?" , obviously the correct procedure to compile a report on grammatical errors, and so on, are caused by the mentally retarded behavior of Notepad. Suggest you download notepad++ instead of Notepad, not only powerful, but also free! Remember to set the default encoding for notepad++ to UTF-8 without BOM :

8. Click the blue button (clone or Download) under the project directory to display clone with HTTPS and Copy the address of the project;

9. Then enter the command under the git client:

the project address to which git clone is copied

10. In the folder where you opened the git client, the new project directory appears, and the project file you want to submit is copied to this directory.

11. In the git client, enter the command git Add. this point is the content representing the current folder );

12. Enter the command:git commit-m "This submission's explanatory information"; Parameters m refers to the information that is submitted.

Finally enter the submitted command:git push-u Origin master submits your local warehouse project to your GitHub account, and you need to enter your GitHub 's account number and password.

13. Command $git Status command to view the state of the file.

14.

The use of 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.