在GitHub存储库中搜索用户创建的所有分支 [英] Search all branches created by a user in a GitHub repository
问题描述
在我们的代码仓库( repoEx
)中有一个由用户创建的分支( knownUserName
)。他承诺的地方和 push
编辑了他的一些更改,但没有为同样的地方创建 Pull Request
。
它已经很长了,存储库现在有一个分支数量的指数增加,因为我们无法通过所有的分支并找到他创建的分支。
是否可以使用 git
命令行或 GitHub
intreface,以查找用户在特定存储库中创建的所有分支? b
我尝试使用GitHub界面并使用搜索过滤分支(在 https://github.com/repoEx/branches/all
下)参数为 -
作者:< knownUserName>
但这不起作用。该搜索似乎对分支名称有效,但我对该名称没有任何线索。
,在用户名
上显示最后一次提交信息grep您将拥有您正在查找的提交ID:
for co在`git branch -a --no-merge`中;做的git日志-1 - 不行--pretty =格式:%h - %an,%ar:%s$ co;完成| grep< knownUserName>
There was a branch created by a user(knownUserName
) in our code repository(repoEx
). Where he committed and push
ed few of his changes but didn't create a Pull Request
for the same .
It has been long and there is an exponential increase in the number of branches that the repository now has because of which we are unable to go through all the branches and find one created by him.
Is there a way to search all the branches using git
command line or GitHub
intreface, to find all the branches created by a user in a specific repository?
I tried using the GitHub interface and filtering the branches(under https://github.com/repoEx/branches/all
) using the search parameter as -
author:<knownUserName>
but this won't work. The search seems to be effective with branch name but I don't have any clue about the name.
loop on the branch, display last commit info grep on the username You will have the commit id you are looking for:
for co in `git branch -a --no-merge`; do git log -1 --no-walk --pretty=format:"%h - %an, %ar : %s" $co; done | grep <knownUserName>
这篇关于在GitHub存储库中搜索用户创建的所有分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!