In Git, list names of branches with unpushed commits

后端 未结 4 1144
深忆病人
深忆病人 2021-01-30 13:02

Given a project with several local branches, each tracking some remote branch, is there a command that lists all branches that have unpushed commits? (That is, even if none of t

4条回答
  •  不要未来只要你来
    2021-01-30 13:11

    although the answers above are very helpful and show alot of data but for others coming here looking for a solution to find local branches which are ahead i.e. have not been pushed yet. can get the exact list by executing:

    git branch -v | grep ahead
    

提交回复
热议问题