{"id":15712382,"url":"https://github.com/andornaut/gog","last_synced_at":"2025-07-26T22:35:39.313Z","repository":{"id":64304503,"uuid":"52212645","full_name":"andornaut/gog","owner":"andornaut","description":"Link files to Git repositories","archived":false,"fork":false,"pushed_at":"2023-08-31T13:09:14.000Z","size":221,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T08:08:53.012Z","etag":null,"topics":["dotfiles","git","symlinks"],"latest_commit_sha":null,"homepage":"","language":"Go","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/andornaut.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":"2016-02-21T15:22:05.000Z","updated_at":"2024-06-05T21:06:31.000Z","dependencies_parsed_at":"2024-06-20T17:34:20.490Z","dependency_job_id":"ef517670-9597-47dd-8f5e-598f39d1f6a9","html_url":"https://github.com/andornaut/gog","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/andornaut/gog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andornaut%2Fgog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andornaut%2Fgog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andornaut%2Fgog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andornaut%2Fgog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andornaut","download_url":"https://codeload.github.com/andornaut/gog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andornaut%2Fgog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265896079,"owners_count":23845422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dotfiles","git","symlinks"],"created_at":"2024-10-03T21:15:56.326Z","updated_at":"2025-07-19T06:06:10.175Z","avatar_url":"https://github.com/andornaut.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gog - Go Overlay Git\n\nLink files to Git repositories\n\n- `gog` can be used to manage \"dotfiles\" in `${HOME}` or elsewhere on the filesystem\n- `gog` supports multiple Git repositories, which can be useful to separate personal and work files\n\n## Installation\n\n### Pre-compiled binary\n\nDownload one of the pre-compiled binaries from the\n[releases page](https://github.com/andornaut/gog/releases), and then move it onto\nyour path: `chmod +x gog-linux-amd64 \u0026\u0026 sudo mv gog-linux-amd64 /usr/local/bin/gog`\n\n### Compile from source\n\nInstall dependencies:\n\n- [Go](https://golang.org/doc/install)\n- [Make](https://www.gnu.org/software/make/)\n\n```bash\ngit clone https://github.com/andornaut/gog.git\ncd gog\nmake install\n```\n\n## Getting started\n\n```bash\n# Clone a git repository and add a file to it\ngog repository add dotfiles https://example.com/user/dotfiles.git\ngog add ~/.config/foorc\n\n# Gog moved `~/.config/foorc` into the default git repository (\"dotfiles\") and\n# then created a symlink to it at its original location\nls -l ~/.config/foorc | awk '{print $9,$10,$11}'\n\u003e /home/example/.config/foorc -\u003e /home/example/.local/share/gog/dotfiles/$HOME/.config/foorc\n\n# Commit and push the changeset to make it available from elsewhere\ngog git commit -am 'Add foo config'\ngog git push\n\n# Login to a remote machine and initialize the same git repository as above\nssh remote@example.com\ngog repository add dotfiles https://example.com/user/dotfiles.git\n\ngog apply\n\n# Gog linked `~/.config/foorc` as above, while preserving any preexisting file at\n# that location as ~/.config/.foorc.gog`\nls -l ~/.config/foorc | awk '{print $9,$10,$11}'\n\u003e /home/example/.config/foorc -\u003e /home/example/.local/share/gog/dotfiles/$HOME/.config/foorc\n```\n\n## Usage\n\n`gog --help`\n\n```\nLink files to Git repositories\n\nUsage:\n  gog [command]\n\nAvailable Commands:\n  add         Add files or directories to a repository\n  apply       Link a repository's contents to the filesystem\n  git         Run a git command in a repository's directory\n  help        Help about any command\n  remove      Remove files or directories from a repository\n  repository  Manage repositories\n\nFlags:\n  -h, --help                help for gog\n  -r, --repository string   name of repository\n\nUse \"gog [command] --help\" for more information about a command..\n```\n\n`gog repository --help`\n\n```\nManage repositories\n\nUsage:\n  gog repository [command]\n\nAvailable Commands:\n  add         Add a git repository\n  get-default Print the name or path of the default repository\n  list        Print the names or paths of all repositories\n  remove      Remove a repository\n\nFlags:\n  -h, --help   help for repository\n\nUse \"gog repository [command] --help\" for more information about a command.\n```\n\n`gog add --help`\n\n```\nAdd files or directories to a repository\n\nUsage:\n  gog add [paths...]\n\nFlags:\n  -h, --help                help for add\n  -r, --repository string   name of repository\n```\n\n`gog apply --help`\n\n```\nLink a repository's contents to the filesystem\n\nUsage:\n  gog apply\n\nFlags:\n  -h, --help                help for apply\n  -r, --repository string   name of repository to apply\n```\n\n### Notes\n\n#### `gog add`\n\nIf any of the path arguments to `gog add` begin with the current user's home\ndirectory, then this prefix is replaced with an escaped `\\${HOME}` path\ncomponent, and then the `${HOME}` variable is expanded when `gog apply` is run.\n\n#### `gog apply`\n\n`gog apply` operates on a single repository at a time, but you can apply\nmultiple repositories - even if they contain partially overlapping files.\n\n```bash\nfor repoName in $(gog repository list | sort -r); do\n  gog --repository ${repoName} apply\ndone\n```\n\n## Configuration\n\nYou can use environment variables to customize some settings.\n\nEnvironment variable | Description\n---|---\nGOG_DEFAULT_REPOSITORY_NAME | The repository to use when `--repository NAME` is not specified (default: the first directory in `${HOME}/.local/share/gog`)\nGOG_DO_NOT_CREATE_BACKUPS | Do not create .gog backup files\nGOG_HOME | The directory where gog stores its files (default: `${HOME}/.local/share/gog`)\nGOG_IGNORE_FILES_REGEX | Do not link repository-relative file paths that match this regular expression\n\n## Developing\n\nSee the [Makefile](./Makefile).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandornaut%2Fgog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandornaut%2Fgog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandornaut%2Fgog/lists"}