How do I list all remote branches in Git 1.7+?

后端 未结 19 2315
轮回少年
轮回少年 2020-12-02 03:14

I\'ve tried git branch -r, but that only lists remote branches that I\'ve tracked locally. How do I find the list of those that I haven\'t? (It doesn\'t matter

19条回答
  •  广开言路
    2020-12-02 04:01

    Using this command,

    git log -r --oneline --no-merges --simplify-by-decoration --pretty=format:"%n %Cred CommitID %Creset: %h %n %Cred Remote Branch %Creset :%d %n %Cred Commit Message %Creset: %s %n"
    
    CommitID       : 27385d919
    Remote Branch  : (origin/ALPHA)
    Commit Message :  New branch created
    

    It lists all remote branches including commit messages and commit IDs that are referred to by remote branches.

提交回复
热议问题