Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I search for a keyword in in a particular branch of the entire repository?

Jasmine.Chacko February 19, 2019

When I do not know in which project to look for a particular code, I would like to search the entire repo with searck key. But only if the search key exists in the master branch, I get the result. If it's in any other branch, I do not see the result.

Is there any way that I can search in a particular branch?

 

1 answer

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

Hi Jasmine,

Welcome to the Atlassian Community.

You have the option to select which branch you want to search by clicking the drop-down field for branches

branch.png

Jasmine.Chacko February 19, 2019

Thank you for your answer. Above screen shot is only for a specific project. But I would like to search in the entire repository under my org. For example, I have 4 projects who have 'develop' branch. I would like to search in that branch of all those 4 projects together.  (I can do this only for 'master' branch for now and not for any other branches)

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

The screenshot if from within a repository, not a project. Projects are just a way of organizing your repositories.

It is not possible to search across multiple repositories, you can only search within the repository and in the selected branch.

Jasmine.Chacko February 19, 2019

Thank you for the clarification. I was actually looking for searching among multiple repositories with the same branch name. Looks like it's possible if the branch is 'master'. 

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

Correct, the search across multiple repositories will only do the search on the default branch, which in most cases is master. These are the restrictions for search:

There are some restrictions on how searches are performed:

  • Only the default branch is searchable (for most repositories the default branch will be master).
  • Only files smaller than 512 KiB are searchable.
  • Wildcard searches (e.g. qu?ck buil*) are not supported.
  • All punctuation characters are removed. !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
  • Regular expressions in queries are not supported, but you can search for special characters.
  • Case is not preserved, however search operators must be in ALL CAPS.
  • Queries cannot have more than 9 expressions (e.g. combinations of terms and operators).
  • The maximum length of a query cannot exceed 250 characters.
  • Only code you have permission to view will appear in the search results.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events