Using Git to manage code under Linux

Source: Internet
Author: User

Environment: centos7.2; Tools: Xshell

1, install git, the command is as follows:

#Yuminstall git

2, set the user name and mailbox, the command is as follows:

' User name '  ' email '

3. Initialize (in the folder where you want to put the project code), the command is as follows:

#git Init

4, connect the remote project address, the command is as follows:

#git Remote Add origin https://gitee.com/xxxxxxx.git

5, pull the code, the command is as follows:

#git Pull Origin Master

Of course it can be another branch.

You will be prompted for a user name and password (you can configure the utility SSH mode so that you do not need to enter your username and password each time).

6, modify the code, file, you can use the following command to view:

#git status

7, after modifying the code, submit, command as follows:

' Submission Instructions ' . #git Push Origin Master

git Add. The following point indicates that all newly added files are submitted, or the specific file name can be specified.

Using Git to manage code under Linux

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.