Home > Development Tools > git > How to quickly create new repositories and branches with git

How to quickly create new repositories and branches with git

藏色散人
Release: 2018-11-22 15:46:24
Original
7685 people have browsed it

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.

How to quickly create new repositories and branches with git

How to quickly create new repositories and branches with git

Then we create a new file index.php and add the following content:

How to quickly create new repositories and branches with git

How to quickly create new repositories and branches with git

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 through

git branchHow to quickly create new repositories and branches with git 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.

How to quickly create new repositories and branches with git 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template