This article mainly introduces how Git can quickly create new repositories and branches locally.
In the previous article, we introduced you to the knowledge points of creating a new repository and branches. In this section, we will first introduce you to the complete process of creating a repository and branches for the follow-up. Explanation of the article.
Below we will use a simple example to actually operate the steps of creating a new repository and branches.
First we create an empty folder demo on the D drive. In the demo, open the Git command line interface and create a new repository through git init.
Then we create a new file index.php and add the following content:
Then we will add index.php to The staging area is then submitted to our repository and noted as "asd".
We continue to view the branch throughgit branch and create a new
branch aaa, as shown below, the current location is Under the master branch .
#At this point, we have successfully and quickly created a new repository and branch.Due to length reasons, the content of this section is equivalent to preparation for the next section that introduces the new content of merging branches "
How to merge branches with Git", so this content is also a reference to the previous related articles. Reviewing, I hope friends who need it can become more proficient in the basic knowledge of creating repositories and branches with git.
The above is the detailed content of How to quickly create new repositories and branches with git. For more information, please follow other related articles on the PHP Chinese website!