Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
188 views
in Technique[技术] by (71.8m points)

git - Git:我如何只列出本地分支机构?(Git: How do I list only local branches?)

git branch -a shows both remote and local branches.

(git branch -a显示远程和本地分支。)

git branch -r shows remote branches.

(git branch -r显示远程分支。)

Is there a way to list just the local branches?

(有没有办法列出当地的分支机构?)

  ask by munyengm translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Just git branch without options.

(只是没有选项的git branch 。)

From the manpage:

(从联机帮助页:)

With no arguments, existing branches are listed and the current branch will be highlighted with an asterisk.

(如果没有参数,则会列出现有分支,并使用星号突出显示当前分支。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...