git本地分支和远程分支_如何列出本地和远程Git分支?

git本地分支和远程分支_如何列出本地和远程Git分支?_第1张图片

git本地分支和远程分支

Git branches provides very useful way to work with a project in multi developer mode. Every developer can use different or his branch to implement new features and then merge them into a main branch. In this tutorial we will learn how to list and print branch information.These branches can be local or remote too.

Git分支提供了一种在多开发人员模式下使用项目的非常有用的方法。 每个开发人员都可以使用不同的分支或分支来实现新功能,然后将它们合并到主分支中。 在本教程中,我们将学习如何列出和打印分支信息,这些分支也可以是本地或远程的。

打印/显示当前分支 (Print/Show Current Branch)

First step to get or list branch is printing or showing current branch. We will use just  git branch command which will list all branches. But current branch will be denoted with the asterisk *. In this example master is our current or working branch.

获取或列出分支的第一步是打印或显示当前分支。 我们将只使用git branch命令,它将列出所有分支。 但是当前分支将用星号*表示。 在此示例中, master是我们当前的或正在工作的分支。

$ git branch
Print/Show Current Branch Print/Show Current Branch 打印/显示当前分支

列出当地分支机构(List Local Branches)

Actually we have all ready listed local branches in previous example but in order to express the current working branch I do not provide this information. So we can list all local branches with the git branch command. In most cases there will be more than one branch.

实际上,在前面的示例中,我们已经准备好列出所有本地分支,但是为了表示当前的工作分支,我没有提供此信息。 因此,我们可以使用git branch命令列出所有本地分支。 在大多数情况下,会有多个分支。

$ git branch

你可能感兴趣的:(git,css,github,正则表达式,java)