Webstorm upload code to GitHub, update code, sync to GitHub and clone GitHub code to the local method

Source: Internet
Author: User
Tags using git

Guide:

GitHub is a well-known platform for it enthusiasts to share code, and it's popular, how do we usually upload our own code to GitHub to save it and provide it to others for reference?

I think there are several ways to do this:

1, upload the code directly on the GitHub Web page (not tried);

2, using git tools, download git and then use command-line tools to upload code, this way requires more command-line knowledge, for unfamiliar command-line tools of small partners is a very headache;

3, the use of development tools Webstorm to carry out similar graphical way to upload code, this method is simple and easy, but also the focus of this article to tell!

Question 1: So how to use Webstorm to upload local code? And look at the following steps to explain

Step 1:

(1) Here are some of the prerequisites you have to prepare, in fact, we use Webstorm upload code principle or git to GitHub upload code, then first you need to download git locally and install, such as Git's official website. (Git download installation is not explained here)

(2) You have to register a GitHub account first, or where do you upload the code? I think the students who can see this article basically have the GitHub account, so this step is ignored.

Step 2:

well, when it's done, we'll add git and GitHub to the Webstorm, and here's how.

(1) The first is the GIT configuration, so-called configuration, is to put your git installation address to Webstorm, open settings, search git, and then the red labeled part of your git address configuration ok (your own git installation address, not necessarily the same as mine OH)

(2) Here's how GitHub's address is configured in Webstorm, which is simply to enter your GitHub account and password and test it, as shown below.

Enter your account password

·

  Test, if the green success is displayed, it means that Webstorm is already configured for GitHub.

Step 3:

2 steps above, all of our preparations are finished, and then we can start uploading the code ~ How to upload it? Like, we dot share Project on Github

Then appear in the box below, the name of the box can be arbitrarily taken but not with your GitHub above the name of the project is duplicated, because we upload a project is the equivalent of a new warehouse, and the warehouse is certainly not repeated, and then point share! Then you can complete the upload code to GitHub!!

The following successful shared project on GitHub represents that you have uploaded the code successfully and then guided GitHub up to see it.

Question 2: The code has already been uploaded to GitHub, so how do we synchronize the code on GitHub after we update the project code locally? Do we need to re-upload all the code again? The answer is no, please look below.

Step 1:

For example, suppose we change the code in index.html

Step 2:

Click VCs on the right,

Step 3:

For example, then click on Commit and push, so that you can put your own modified code to the above GitHub, it is very convenient to try it!!

Question 3: Now I'm going to upload my code to GitHub, so how do we download someone else's code??

In fact, the problem is very simple, we directly use the command line tool, Git clone https://github.com/teamemory/elm.git (this address is a red label place) can download the code to local, There is no need to use Webstorm to download the code here.

Webstorm upload code to GitHub, update code, sync to GitHub and clone GitHub code to the local method

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.