仅列出远程活动分支的命令 (bitbucket)

时间:2021-02-04 08:11:56

标签: git bitbucket git-branch

Image is listing only active branches, need command for the same on terminal

我尝试过使用 git branch -r --no-merged 但可能有从未合并的分支。所以,只需要列出活动的远程分支,而不是所有的远程分支。请分享相同的命令。

1 个答案:

答案 0 :(得分:0)

考虑到即使 BitBucket API listing branches 也没有提及任何“活动”属性,该特定功能(活动分支列表)可能不容易获得。

您需要fetch and display each branch last commit date来确定哪些是“最近”更新的:

git fetch && \
git branch -av --format='\''%(authordate)%09%(authordate:relative)%09%(refname)'\'