From the completion of Vue scaffolding creation to GitHub building Kura library push code process (record)

GitHub is something we often use in projects, but we often encounter strange bugs when we use it for the first time. In order to deepen our impression, the whole process from the first use to the completion of code push, here record it.

 1. The first is the creation of Vue Cli

1. Create a new folder on the desktop and open it with vscode

2. Open the terminal in vscode or cmd. I open the terminal directly in vscode and enter [vue create test]. This test is the name I took

 3. The next step is the configuration item, which varies from project to project, and those who are just trying it can also refer to it. The following process will not be explained in words, just look at the picture!

 

 

 

 

 

 

 4. After the above configuration selection is completed, it will enter the waiting time for the scaffolding to install itself

 5. After the installation is complete, follow the prompts, first cd test and then enter npm run serve to start the project

After the installation of Vue scaffolding is completed, enter the second step: the creation of GitHub remote warehouse!

 2. Creation of GitHub remote warehouse

1. First enter the GitHub official website, click the red madness in the picture below, and create a new warehouse

2. Just choose a name for the warehouse creation, yes, don’t doubt it, just need to give a name and click Create repository to complete the creation of the warehouse

 3. After clicking Create repository, you will enter a page, select SSH here, and copy the following address

 So far, the library has been created, but now our Vue project has not been connected to this library, so the next thing we need to do is to connect the project and the remote warehouse!

 3. Connect the Vue project and the remote warehouse created

1. Next to the last step of the second step, we copied the path behind SSH and returned to the root directory of our project file, right-clicked on Git Bash Here (this step defaults to your installation of Git, if not, go to the official website to download one first , the link is attached here Git https://git-scm.com/

 2. In the pop-up terminal box, enter [git remote add origin the SSH address you just copied]

If the following problems occur in step 2

 Just enter git init to solve it later

  3. At this time, enter [git remote] to find that there is an additional branch called origin (if you want to create and switch to another branch, you can use the [git checkout -b branch name] command)

but! If you use GitHub to do the above steps for the first time, you will encounter a bug. Generally speaking, this bug is just because you did not configure the SSH key for the first time, so if you report an error here, go back to the GitHub official website. configuration

Attach the blog address of my big brother that I refer to when github uploads the project, it reports [email protected]: Permission denied (publickey). fatal: Could not read from remote repo_hayhead's blog-CSDN Blog

 4. After the branch is successfully created [you can enter git push origin master] to see the effect

 5. Go back to the GitHub official website and find the newly created warehouse. If there is an update, it means success (here, my screenshot is slow, so it shows that it was updated two minutes ago)

 gradually accumulate

Guess you like

Origin blog.csdn.net/a666666000/article/details/125564265