Does git log --branches work?

前端 未结 5 977
北荒
北荒 2020-12-28 12:44

I can\'t seem to get git log --branches to correctly filter its output. It seems as if Git ignores it.

For example, the head of git log --graph --

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-28 13:39

    Let's say your history looked like this

      d -- e [refs/tags/release1]
     /
    a -- b -- c [refs/heads/master]
          \
           f -- g [refs/heads/dev1]
            \
             h [refs/heads/dev2]
    

    If you do git log --branches it's the same git log master dev1 dev2, so you'll see commits a,b,c,f,g and h. If you did git log release1 --branches=dev* it's the same as git log release1 dev1 dev2. You'll see a,d,e,b,f,g, and h, but not c.

提交回复
热议问题