searching for non-code items #129080
Replies: 3 comments 2 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Can you clarify what you would like to do? It sounds like you want to search by file path rather than the file contents. You can use code search for that with the |
Beta Was this translation helpful? Give feedback.
-
Response #2 I understand the challenge you're facing with searching for non-code files in a large GitHub project. While GitHub's built-in search functionality is primarily focused on code, there are a few strategies and tools you can use to effectively search for non-code files. Here are some suggestions: Using GitHub's Advanced SearchAlthough GitHub's search is primarily for code, you can use some advanced search operators to filter results more effectively. For example:
Using a Local Clone and Command-Line ToolsCloning the repository locally and using command-line tools can be a powerful way to search for non-code files.
Using Third-Party ToolsThere are third-party tools and extensions that can enhance your search capabilities:
Custom ScriptsIf you have specific requirements, writing a custom script to search for files might be the best solution. Here's a simple Python script to search for files by name: import os
def search_files(root_dir, search_term):
matches = []
for root, dirnames, filenames in os.walk(root_dir):
for filename in filenames:
if search_term in filename:
matches.append(os.path.join(root, filename))
return matches
# Example usage
root_directory = 'path_to_your_local_repo'
search_term = 'part_of_filename'
matches = search_files(root_directory, search_term)
for the match in matches:
print(match) SummaryWhile GitHub's native search may have limitations, using a combination of advanced search operators, local command-line tools, third-party applications, and custom scripts can help you efficiently search for non-code files in large projects. If you frequently encounter this issue, consider providing feedback to GitHub to enhance their search capabilities for non-code files. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Product Feedback
Body
Hi! I'm currently working on a project that requires a ton of Github files. This including non-code files. But if i search in a project for a part of the name, it will at first only show me 40 items. Then, if i press Show more, it will search in CODE. But i don't want to search in code. so PLEASE, github, make a possibility to search for non-code items. Now i will have to manually look through about 200 folders.
Beta Was this translation helpful? Give feedback.
All reactions