{"id":22731742,"url":"https://github.com/fenhl/gitdir","last_synced_at":"2026-05-17T17:09:39.136Z","repository":{"id":36148670,"uuid":"40452693","full_name":"fenhl/gitdir","owner":"fenhl","description":"Keep your git repos organized","archived":false,"fork":false,"pushed_at":"2023-09-10T07:56:14.000Z","size":50,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-10T17:59:41.611Z","etag":null,"topics":["command-line-tool","git","python-library","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fenhl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-09T22:27:56.000Z","updated_at":"2022-09-05T13:48:32.000Z","dependencies_parsed_at":"2024-12-10T19:41:10.007Z","dependency_job_id":"0facc0e1-90d0-4683-8cbd-88df7ec52994","html_url":"https://github.com/fenhl/gitdir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fenhl/gitdir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fgitdir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fgitdir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fgitdir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fgitdir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fenhl","download_url":"https://codeload.github.com/fenhl/gitdir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fgitdir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33147340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","git","python-library","python3"],"created_at":"2024-12-10T19:30:17.767Z","updated_at":"2026-05-17T17:09:39.024Z","avatar_url":"https://github.com/fenhl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**gitdir** is a system that helps you keep your git repositories organized. It is *not* a git workflow, and works with different (but not all) workflows. Gitdir is the successor to [hubdir](https://github.com/fenhl/hubdir), generalized to allow working with repositories that are not hosted on github.\n\nThis is gitdir version 3.0.0 ([semver](http://semver.org/)). The versioned API is described below, in the section *The system*.\n\n# The system\n\nThis section describes the gitdir system.\n\n## The directories\n\nIn the gitdir system, all git repos are organized within the *git directories*, or *gitdirs*. There are two kinds of gitdir:\n\n1.  the global gitdir at `/opt/git`, and\n2.  the local gitdirs at `~/git`. Each user can have their own local gitdir.\n\nThe global gitdir will be used by default, while the user's local gitdir is used only for staging and when the global gitdir is inaccessible.\n\n## Directory structure\n\nA gitdir contains subdirectories for any host from which repositories are cloned. The way repositories are organized within the host directory is defined individually for each host. For example, `github.com` organizes repositories by github username and repo name, so that the directory for this repo would be located at `/opt/git/github.com/fenhl/gitdir`.\n\nFour different kinds of repos may reside within a repo directory:\n\n1.  Main repos, located at `\u003crepodir\u003e/main` (fallback to `\u003crepodir\u003e/master` for backwards compatibility). These track [the default branch](https://help.github.com/articles/setting-the-default-branch) from the remote and should always stay clean.\n2.  Branches, located at `\u003crepodir\u003e/branch/\u003cbranch\u003e`. These work like the main repos, except they track a different remote branch.\n3.  Stages, located at `\u003crepodir\u003e/stage`. These have more loose restrictions and are where any work happens.\n4.  Bare repos, located at `\u003crepodir\u003e/\u003creponame\u003e.git`. These are created with `git init --bare`, and should be used as the remote when hosting locally (`/opt/git/localhost`).\n\n## Repo setup\n\nWithin a repo, the following rules should be, well, followed:\n\n*   All github repos have the default `origin` remote set up as follows:\n    *   For main and branch repos, `https://github.com/\u003cuser\u003e/\u003creponame\u003e.git`\n    *   For stage repos, `git@github.com:\u003cuser\u003e/\u003creponame\u003e.git`\n*   Main and branch repos have no other remotes. For stages, do whatever works best for your git workflow.\n*   In multi-user environments, the global gitdir and everything under it should be owned by a group named `git` and be group read-writeable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenhl%2Fgitdir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffenhl%2Fgitdir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenhl%2Fgitdir/lists"}