Add branch as a search filter #8564
Replies: 27 comments 50 replies
-
We've actually been discussing what the right UX should be, both for surfacing results from non-default branches and for restricting to particular branches. Certainly it seems that, for global or multi-repo searches, most users just expect to see the default branch. What use case do you have in mind? Something like a |
Beta Was this translation helpful? Give feedback.
-
How does code search handles search when |
Beta Was this translation helpful? Give feedback.
-
Hi all! I thought of this idea: Control access to the branches of each repository - What do you all think of this idea? ui/uxNotesWith the branch control, you can search by branch types: public, private. |
Beta Was this translation helpful? Give feedback.
-
Just here to 👍 indexing all branches. From search specification perspective I think it would be nice to be able to
|
Beta Was this translation helpful? Give feedback.
-
Is this part of the new search currently in technology preview? |
Beta Was this translation helpful? Give feedback.
-
Just saw new search hit public beta and was hoping this'd be one of the improvements, sadly not 😿 |
Beta Was this translation helpful? Give feedback.
-
This is useful to search for something in PRs when reviewing them. It could be reasonable to only make it available in non-stale branch, if indexing volume is a concern. |
Beta Was this translation helpful? Give feedback.
-
Was looking for how to search on a branch and I am very shocked github isn't capable of it |
Beta Was this translation helpful? Give feedback.
-
I literally was trying to roll out protection for our internal specifically named protected branches and wanted to make sure all branches in our org with this naming convention was protected. |
Beta Was this translation helpful? Give feedback.
-
Searching within a branch would be great. This is especially important with repos where the branches aren't necessarily the same content, such as gh-pages branches. A start would be letting us search the currently selected branch. FWIW, one solution to not having branch search is forking the repo and doing feature-branch work in the fork. This isn't always available though, especially if you care about maintaining the fork relationship on GH. It's easy to clone and push to a new repo, but that GH fork relationship is broken. |
Beta Was this translation helpful? Give feedback.
-
29 Jan 2024: I tried to use this feature (searching with |
Beta Was this translation helpful? Give feedback.
-
I can see how it wouldn't necessarily make sense to index all branches, when certain branches have a short time of life. Perhaps there could be an option to explicitly enable indexing on a per branch basis (where it would be automatically enabled on the main branch), which would then allow to filter results by branch... |
Beta Was this translation helpful? Give feedback.
-
I'd love to at least say the other important branches on a repo. |
Beta Was this translation helpful? Give feedback.
-
I was looking to search within a specific tagged release of our codebase. I started from a code view set to that tag, and was confused at first when search results were from the master branch, then was amazed to discover there is no feature at all to search the code at a specific tagged release. Please fix this. |
Beta Was this translation helpful? Give feedback.
-
Please implement this. You guys are Microsoft now... you basically have unlimited money to pay devs for this feature 😅 |
Beta Was this translation helpful? Give feedback.
-
I expected much more comments in this topic |
Beta Was this translation helpful? Give feedback.
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
how come that searching in different branch is not a default feature?? |
Beta Was this translation helpful? Give feedback.
-
has this feature been added to github yet? |
Beta Was this translation helpful? Give feedback.
-
I am looking for to search by tag:v8.0.1 or branch:main Why is this not implemented yet??? Is it not so simple? There are apis to search it by tag or branch already |
Beta Was this translation helpful? Give feedback.
-
This should be a basic feature, it's been long requested. Has there been no progress? |
Beta Was this translation helpful? Give feedback.
-
💡 Today I learned about the github.dev web-based editor public beta that offers a different workaround for searching a branch than having to clone it to a separate repo: https://docs.github.com/en/codespaces/the-githubdev-web-based-editor#about-the-githubdev-editor Yes it uses Vscode search syntax, but it's a start. This gives new relevance to related discussions such as https://github.com/orgs/community/discussions/8798 |
Beta Was this translation helpful? Give feedback.
-
I was just hit with this again today. Somebody asked me about some documentation to add about a feature, and which versions it should be included with. I went to the GH repo for the project, switched to the branch, and performed a search... and then I remembered that searching only happens on the default branch. It's so counter-intuitive. Here I am using FOSS |
Beta Was this translation helpful? Give feedback.
-
yes please add this! i'm searching for edit: or in advanced search, add option to select branches in there |
Beta Was this translation helpful? Give feedback.
-
+1 on this feature... |
Beta Was this translation helpful? Give feedback.
-
For everybody who just needs a solution, here's how to use the git grep 'search string' $(git branch -a --format='%(refname:short)') The output is |
Beta Was this translation helpful? Give feedback.
-
It's super hard to search for something on a specific branch or tag. It would be great if we could have a filter for that.
Beta Was this translation helpful? Give feedback.
All reactions