Use git bash to download code from git to local and upload code to code cloud git

Source: Internet
Author: User

The premise is that Gitbash has been installed, this later out tutorial

1, create a new directory, to store the downloaded items, I have a new "Gitspace" folder on the D disk, to store the downloaded items

2, enter the newly created folder, that is, enter "Gitspace", click the right mouse button, select "Git Bash here", such as:

After clicking on "Git bash here", you can see the following interface, otherwise, your Git bash may have a problem installing

3, basic configuration, as the basic configuration of git, the role is to tell git who you are, the information you entered will appear in the submission you created, using the following two commands:

git config--global user.name "your name or nickname"

git config--global User.email "your mailbox"

4. Execute the following command in the Gitspace folder to complete the initialization

Git init

Git remote Add origin < your project address > //Note : The project address form : HTTPS://gitee.com/xxx/xxx.git or Git@gitee. Com:xxx/xxx.git

5, if you want to clone, only need to execute the command

git clone < project address >

Pop-up window, enter the code cloud account name, password

Click "OK"

Look again under the Gitspace folder, has been downloaded

6 . Enter the directory where you have initialized the good or cloned project, and then execute:

Update the project from the server because it has already been clone, so there is no need to update

Git pull Origin Master

7, make some changes, such as adding a "description. txt" file

Execute the following command to complete the first commit

git Add.

git commit-m "Installation tutorial Test"

Git push Origin Master

Note: There are two commit commands, Git push Origin master (normal commit) and GIT push Origin master-f (mandatory commit, mandatory commit may put the previous commit comment information, will not change the modified code, with caution), are submitted to the master branch

can refer to the Code Cloud Platform help document _v1.2 http://git.mydoc.io/?t=180676

Use git bash to download code from git to local and upload code to code cloud 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.