Reputation: 34175
I am new to git and what I am doing now is to upload all my recent projects as repositories to github. There are a lot of different projects like webdesign, wordpress themes and different types of applications. And some of these also belong to bigger projects because they were about testing some stuff as a different application.
The problem is that I have a confusing amount of repositories online now. How can I group related github repositories in a folder structure? Is there a feature providing any ability to order and structure or even tag repositories on github?
Upvotes: 328
Views: 186842
Reputation: 193
You can use GitHub lists to sort an unorganized lists of repos like this:
Into something like this:
It's pretty simple. Just go into your repositories tab on www.github.com and select the dropdown arrow next to each repository to categorize it into a specific "list":
You can then browse your repos under specific lists on the
https://github.com/USERNAME?tab=stars
page.
Upvotes: 3
Reputation: 1323953
Update Dec. 2023: it's happening! (kind of)
New Organization Repositories List Feature Preview (Dec. 2023)
In October, we launched the beta of Repository Custom Properties, enabling you to attach key-value pairs to repositories in your organizations.
Among many scenarios, one of the key components we had envisioned was the ability to filter your repository properties.
Making it easier to find exactly the set of repositories you were looking for.Starting today, you can enable a new list view for repositories.
This update improves accessibility and performance and introduces a new filter bar supporting properties.To enable select
New organization repositories view
option in the feature preview dialog.Learn more about managing customer properties for your organization and managing rulesets for your organization.
Head over to the community discussions to share your feedback.
Update Sept. 2023: the same GitHub Community Issue #4174: "Support repository categories" adds from the Customer Support:
Guy (GitHub Support)
Sep 15, 2023, 11:04AM UTCHi Tom:
I understand, I've added your comments about the lack of this feature being a blocker for your org to our internal customer feedback tracker.
Requests for It have been made by some quite large Enterprise orgs since at least 2014, and the Product Managers have never been persuaded to implement It, so I don't think it's likely they will change their minds any time soon, unfortunately.
Cheers,
Guy
So no project folder structure for now (2023).
Update Dec. 2021:
Lists are now available as a public beta
Lists level up the starring experience by making it easy to organize and curate your favorite repositories on GitHub.
You can create public lists that appear on your stars page at https://github.com/USERNAME?tab=stars.
Lists are available to everyone except enterprise managed users.
However (June 2022), as illustrated by Wyck in GitHub Community Issue #4174: Support repository categories, the presentation is still lacking:
if I click the topic button, it shows me a list of all public repos marked with that same topic keyword.
Instead, I'd prefer if there was a way to view only repos within my organization marked with that topic.I'd also like to see a top-level list of all topic that have been marked on any repos within my private organization, to serve as a top-level directory or table-of-contents of repos in my organization.
Original answer:
On GitHub itself, you cannot group your repos by "folder", unless you create organizations.
See SublimeText, for instance, as a group of all sublimeText packages repos.
But that won't support a nested folder organization. For now (June 2017), that only supports a nested team organization structure.
Update Aug. 2020: the README project allows you to add a profile page... in which you can list and organize your repositories any way you want. But that is a manual process (editing the page).
Update February 2019: you now have the concept of project:
See "User owned projects—your personal workspace "
You can also link up to 5 repositories to your project board. Linking repositories will limit the scope of the search to those linked repositories, so you can quickly narrow down any new issues you haven’t yet added to the project board
GitHub also supports tags now (in the form of topics).
Original answers 2012:
Another solution is for you to define repositories which reference other repos, declared as submodules.
That way, when you are cloning one of the repos (which references other repos), called "parent repos", they will be cloned in their own directory, with a sub-directory per submodules.
It won't be visually apparent on your GitHub account itself (as it will still contains a large list of repos, even larger with the parent repos), but by cloning one parent repo, you will get back all its associated submodules in it.
The issue 302 mentioned in the comments by AnneTheAgile in 2014 just references now (Nov. 2018) tbnorth/github_repo_tags
The small python program in this repository uses the GitHub API to get a list of your repos. and add their name, description, and URL, to a new repo., by default called repo_tags. Initially each “issue” is tagged unclassified, but you can tag them as you please, using regular issue tagging.
When re-run,
repo_tags.py
only creates issues for repos. that weren't already covered by an issue.
Upvotes: 153
Reputation: 731
The git repo and git repos represent the services for the business domain they belong to. As such, it makes sense to own those repos by teams. You may create a team and add the repos that are owned by that team. Access can also be managed better with team's concept.
The idea is inspired from Team Topology
Upvotes: 1
Reputation: 1415
So it is confirmed that there is no folder function in Github.
I think to organize repositories, you could have 2 approaches.
to use a file system, each file refer to one repository, they are just a link to GitHub, put them inside the folder with folder names as the categories ( a python script could generate all files, and you drag and drop)
organize using a directed graph ( no existing tool, you need to build a web or desktop app to do that, I am coding this out)
Upvotes: 2
Reputation: 579
Drawbacks with the Projects approach include:
These problems are not present with the Organizations approach. However:
notice: These things may be subject to change as Github develops further.
Upvotes: 0
Reputation: 5153
I use Organizations to arrange repos. This allows for clean delineation and clear organization, ripe for sharing if needed. For example:
My Organizations
All organization repos are public though unless you upgrade to an Enterprise Cloud account ($25/mo) As of September 2020 you can have unlimited public/private repositories under an Organization. (see options here)
Upvotes: 16
Reputation: 1378
One possible way to simulate folders is by appending comma-separated tags to the end of your repo description. You can then search for repos by these tags, since the GitHub 'Find a repository...' filter looks in the repo description! An example:
MyRepo: Does some cool stuff [computer-vision, machine-learning, python]
Upvotes: 6
Reputation: 1492
For starters, you can tag repos now in GitHub, in the form of topics. Yay!
But I don't think it solves the bigger problem. For this, I have tried a top level folder system (where each project is a folder in one repo). I have also tried a one branch per project system (where each project is in a new branch). This last one allows you to pull and push each project separately too! But, neither is ideal.
You can also look into other version control systems like subversion and mercurial. Mercurial can also be hosted on Bitbucket if you need, and Facebook is even looking into support for "multi-project repositories".
I personally like the system of https://hg.openjdk.java.net/ (or http://hg.netbeans.org/), where you have a folder setup and each project is hosted at endpoints. The best way to achieve this is through creating a website (which you can do in GitHub) with your project structure (like https://mvnrepository.com/ or https://www.npmjs.com/).
Upvotes: 2