Statement:

  • For the basic git installation, the use of git commands, as well as the difference and connection between local and remote repositories, there should be most articles on the gold digging, this will not be summarized, the main meaning of writing this article is to record my first in the company with vscode to write requirements, I hope to give some help to the new staff for some problems about gitLab and local warehouse on VSODE.
  • This article is some of their own understanding and summary, there are shortcomings also hope to point out

Cause:

When writing requirements, unlike when we learned the front end ourselves, we had our own remote repository in the company to store the code. When you need to complete some requirements, the first thing you do is go to a remote repository and pull the code down for development

Body:

  • The name of the branch in the bottom left corner of your vscode will be changed to mastetr,

  • At that time, I thought, is this the local masetr or the remote master (personal comparison, the head of the devil to save life), I found a lot of information, after my own practice, I determined that this is the local master branch, the specific determination process is as follows.
  • In conclusion, whether you start with the remote master pull code, or later switch to your own remote repository to develop, you will create a branch in the local repository with the same name and establish a trace relationship with the remote branch

  • Here such as origin/HEAD is you build remote branch of the warehouse, you click on the switch to this branch, the corresponding vscode sat down after also can appear the HEAD branch of corresponding angles, this is because when you switch to the remote branch, will create a local branch of the same name, the branch to establish contact with the remote, namely trace relationships, To determine your own list of local branches, check git Branch (which lists the names of your local branches) to see if it automatically creates a local branch with the same name. You can also verify my statement is correct, after all, programming this matter must be knocked out, their own growth.

One more thing: If you want to pull code from your own branch, there’s no clone address, so what do you do? You can just pull code from your own branch, and then cut the branch from your own branch, The code you use is your own remote branch code