git获取所有本地或者远程分支

1、git 列出本地所有分支

git branch -a

命令执行结果

$ git branch -a
* master
  remotes/mirror/master
  remotes/origin/HEAD -> origin/master
  remotes/origin/dev
  remotes/origin/master
  remotes/origin/theme

2、git列出本地所有tag标签

git tag -l

命令执行结果

$ git tag -l
V1.1.1

3、git 列出所有远程分支及标签

git ls-remote https://gitee.com/kitesky/kitecms.git

其他参数配置

-q, --quiet           do not print remote URL
--upload-pack <exec>  path of git-upload-pack on the remote host
-t, --tags            limit to tags
-h, --heads           limit to heads
--refs                do not show peeled tags
--get-url             take url.<base>.insteadOf into account
--sort <key>          field name to sort on
--exit-code           exit with exit code 2 if no matching refs are found
--symref              show underlying ref in addition to the object pointed by it
-o, --server-option <server-specific>
                      option to transmit

已发布

分类

来自

标签:

评论

发表回复