Git list of branch names of specific remote

前端 未结 3 960
遥遥无期
遥遥无期 2021-01-31 08:15

How can it possible to get all names of some remote origin branches?

I started from --remote --list options, but got redundant origin/HEAD -> origi

3条回答
  •  南旧
    南旧 (楼主)
    2021-01-31 09:00

    An alternate method, after some research into the same problem, is:

    git for-each-ref --format='%(refname:strip=2)' refs/remotes/
    

    This will give a sorted list of your local refs for the named remote at the point you last fetched.

    You can adjust this for their tags etc.

提交回复
热议问题