{"id":48265409,"url":"https://github.com/belaytzev/git-scoper","last_synced_at":"2026-04-04T21:53:13.049Z","repository":{"id":341447375,"uuid":"1169886980","full_name":"belaytzev/git-scoper","owner":"belaytzev","description":"Automatically apply git `user.name` and `user.email` to every repository in a directory — so you never commit with the wrong identity again.","archived":false,"fork":false,"pushed_at":"2026-03-22T14:02:23.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-23T05:17:15.852Z","etag":null,"topics":["git","gitconfig"],"latest_commit_sha":null,"homepage":"https://git-scoper.ti1orn.com","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/belaytzev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-01T11:30:06.000Z","updated_at":"2026-03-22T14:02:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/belaytzev/git-scoper","commit_stats":null,"previous_names":["belaytzev/git-scoper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/belaytzev/git-scoper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belaytzev%2Fgit-scoper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belaytzev%2Fgit-scoper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belaytzev%2Fgit-scoper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belaytzev%2Fgit-scoper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belaytzev","download_url":"https://codeload.github.com/belaytzev/git-scoper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belaytzev%2Fgit-scoper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31415473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: 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":["git","gitconfig"],"created_at":"2026-04-04T21:53:12.546Z","updated_at":"2026-04-04T21:53:13.018Z","avatar_url":"https://github.com/belaytzev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"website/logo.svg\" alt=\"git-scoper logo\" width=\"128\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003egit-scoper\u003c/h1\u003e\n\n\u003e 🎯 Automatically apply git `user.name` and `user.email` to every repository in a directory — so you never commit with the wrong identity again.\n\n[![GitHub release](https://img.shields.io/github/v/release/belaytzev/git-scoper?style=flat-square)](https://github.com/belaytzev/git-scoper/releases)\n[![Go Version](https://img.shields.io/badge/Go-1.21+-00ADD8?style=flat-square\u0026logo=go)](https://go.dev)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n[![CI](https://img.shields.io/github/actions/workflow/status/belaytzev/git-scoper/ci.yml?style=flat-square\u0026label=CI)](https://github.com/belaytzev/git-scoper/actions)\n[![Homebrew](https://img.shields.io/badge/Homebrew-tap-FBB040?style=flat-square\u0026logo=homebrew)](https://github.com/belaytzev/homebrew-tap)\n\n---\n\n## 📖 Table of Contents\n\n- [✨ Why git-scoper?](#-why-git-scoper)\n- [🚀 Quick Start](#-quick-start)\n- [📦 Installation](#-installation)\n- [🛠️ Usage](#️-usage)\n- [⚙️ Configuration](#️-configuration)\n- [🔄 How It Works](#-how-it-works)\n- [📋 Output](#-output)\n- [💡 Example](#-example)\n- [🚦 Exit Codes](#-exit-codes)\n- [🤝 Contributing](#-contributing)\n- [📄 License](#-license)\n\n---\n\n## ✨ Why git-scoper?\n\nEver committed code with your **personal email** on a **work repo**? Or vice versa? 😬\n\nManaging git identities across dozens of repositories is tedious and error-prone. **git-scoper** fixes that in one command.\n\n- 🏷️ **Scope your identity** — Apply `user.name` and `user.email` to every repo under a directory\n- ⚡ **Fast \u0026 parallel** — Scans directories concurrently with configurable worker count\n- 🧠 **Smart config resolution** — Reads from a local `gitconfig` file or falls back to `~/.gitconfig`\n- 📂 **Depth control** — Configure how deep to scan for nested repositories\n- 🔒 **Safe by default** — Never silently ignores bad config; exits with clear errors\n- 🍺 **Easy install** — Available via Homebrew or `go install`\n\n---\n\n## 🚀 Quick Start\n\n```bash\n# Install via Homebrew\nbrew tap belaytzev/tap \u0026\u0026 brew install git-scoper\n\n# Create a config file in your work directory\necho -e \"name=Jane Doe\\nemail=jane@acme.com\" \u003e ~/Work/gitconfig\n\n# Apply git identity to all repos under ~/Work\ngit-scoper ~/Work\n```\n\nThat's it! 🎉 Every git repository under `~/Work` now has the correct identity configured.\n\n---\n\n## 📦 Installation\n\n### 🍺 Homebrew (macOS / Linux)\n\n```bash\nbrew tap belaytzev/tap\nbrew install git-scoper\n```\n\n### 🔧 From Source\n\nRequires Go 1.21+:\n\n```bash\ngo install github.com/belaytzev/git-scoper@latest\n```\n\n### 📋 Prerequisites\n\n- `git` must be installed and available on `PATH`\n\n---\n\n## 🛠️ Usage\n\n```\ngit-scoper [flags] [base-dir]\n```\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--depth` | `2` | 📏 Max directory depth to scan, relative to `base-dir` (depth 1 = immediate children only, depth 2 = one level deeper) |\n| `--workers` | `4` | 🔀 Parallel workers (must be ≥ 1) |\n\n- If `base-dir` is omitted, the current directory is used.\n- If `base-dir` is itself a git repository, config is applied directly to it and no subdirectory scanning occurs.\n\n---\n\n## ⚙️ Configuration\n\ngit-scoper reads configuration from the following sources (in priority order):\n\n### 1️⃣ Local config: `\u003cbase-dir\u003e/gitconfig`\n\nA simple key=value format:\n\n```\nname=Jane Doe\nemail=jane@example.com\n```\n\n\u003e ⚠️ If this file exists but is missing `name=` or `email=`, the tool exits with an error. If the file exists but cannot be accessed (e.g. permission denied) or is a directory, the tool exits with an error rather than falling back to `~/.gitconfig`.\n\n### 2️⃣ Global config: `~/.gitconfig`\n\nStandard git INI format — reads the `[user]` section.\n\n---\n\n## 🔄 How It Works\n\n```\n┌─────────────────────────────────────────────────────┐\n│                   git-scoper                        │\n├─────────────────────────────────────────────────────┤\n│                                                     │\n│  1. 📖 Read Config                                  │\n│     └─ \u003cbase-dir\u003e/gitconfig  ──or──  ~/.gitconfig   │\n│                                                     │\n│  2. 🔍 Scan Directory                               │\n│     └─ Walk \u003cbase-dir\u003e up to --depth levels         │\n│        looking for .git/ directories                │\n│                                                     │\n│  3. ⚡ Apply in Parallel                            │\n│     └─ N workers run `git config user.name`         │\n│        and `git config user.email` concurrently     │\n│                                                     │\n│  4. 📊 Report Results                               │\n│     └─ Updated ✅ │ Failed ❌ │ Skipped ⏭️          │\n│                                                     │\n└─────────────────────────────────────────────────────┘\n```\n\n---\n\n## 📋 Output\n\nEach scanned path appears as one of:\n\n| Status | Meaning |\n|--------|---------|\n| ✅ `Updated: \u003cpath\u003e` | Git config was applied successfully |\n| ❌ `Failed: \u003cpath\u003e (\u003creason\u003e)` | Git config could not be applied (e.g. not a writable repo) |\n| ⏭️ `Skipped: \u003cpath\u003e` | Direct child of `base-dir` that contains no git repository within the scan depth |\n\n\u003e 📝 Directories that cannot be read during scanning are silently ignored and do not appear in any output line.\n\n---\n\n## 💡 Example\n\n```\n$ git-scoper /Work/Acme\nConfig: name=Jane Doe, email=jane@acme.com\nScanning: /Work/Acme (depth 2)\n------------------------\nUpdated: ProjectAlpha\nUpdated: tools/ProjectBeta\nFailed: tools/ReadOnly (git config user.name failed: exit status 128)\nSkipped: docs\n------------------------\nDone. 2 updated, 1 failed, 1 skipped.\n```\n\n---\n\n## 🚦 Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| `0` ✅ | All repos updated successfully |\n| `1` ❌ | Any failure: invalid flag values (`--depth` or `--workers` less than 1), `base-dir` does not exist or is not a directory, no config found, scan error, or one or more repos reported `Failed:` |\n\n\u003e 💡 **Tip**: Check individual `Failed:` lines for per-repo error details.\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! 🎉\n\n1. 🍴 Fork the repository\n2. 🌿 Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. 💾 Commit your changes (`git commit -m 'Add amazing feature'`)\n4. 📤 Push to the branch (`git push origin feature/amazing-feature`)\n5. 🔃 Open a Pull Request\n\nPlease make sure your code passes CI checks before submitting.\n\n---\n\n## 📄 License\n\nMIT \u0026copy; [Alexey Belaytzev](https://github.com/belaytzev)\n\nSee [LICENSE](LICENSE) for details.\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with ❤️ for developers who juggle multiple git identities\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelaytzev%2Fgit-scoper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelaytzev%2Fgit-scoper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelaytzev%2Fgit-scoper/lists"}