{"id":51005184,"url":"https://github.com/graelo/git-perms","last_synced_at":"2026-06-20T19:32:57.027Z","repository":{"id":351271749,"uuid":"1209797982","full_name":"graelo/git-perms","owner":"graelo","description":"Store and restore Unix file permissions across git operations","archived":false,"fork":false,"pushed_at":"2026-06-14T22:58:01.000Z","size":101,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T00:21:13.136Z","etag":null,"topics":["cli","developer-tools","file-permissions","git","git-hooks","permissions","rust","unix"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graelo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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-04-13T19:43:23.000Z","updated_at":"2026-06-14T22:58:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/graelo/git-perms","commit_stats":null,"previous_names":["graelo/git-perms"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/graelo/git-perms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graelo%2Fgit-perms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graelo%2Fgit-perms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graelo%2Fgit-perms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graelo%2Fgit-perms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graelo","download_url":"https://codeload.github.com/graelo/git-perms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graelo%2Fgit-perms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34583589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","developer-tools","file-permissions","git","git-hooks","permissions","rust","unix"],"created_at":"2026-06-20T19:32:56.445Z","updated_at":"2026-06-20T19:32:57.020Z","avatar_url":"https://github.com/graelo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `git-perms`\n\n[![crate](https://img.shields.io/crates/v/git-perms.svg)](https://crates.io/crates/git-perms)\n[![documentation](https://docs.rs/git-perms/badge.svg)](https://docs.rs/git-perms)\n[![license](https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue)](#license)\n[![minimum rustc 1.95](https://img.shields.io/badge/rustc-1.95+-red.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)\n[![rust 2024 edition](https://img.shields.io/badge/edition-2024-blue.svg)](https://doc.rust-lang.org/edition-guide/rust-2024/index.html)\n[![build status](https://github.com/graelo/git-perms/actions/workflows/ci-essentials.yml/badge.svg)](https://github.com/graelo/git-perms/actions/workflows/ci-essentials.yml)\n\nStore and restore Unix file permissions across git operations.\n\nVersion requirement: _rustc 1.95+_\n\n:warning: **alpha** maturity level: **don't use this yet**\n\n## Why\n\nGit only tracks the executable bit. If your project relies on specific file\npermissions (e.g. `0600` for secrets, `0755` for scripts), those modes are lost\nafter clone, checkout, merge, or rebase. `git-perms` solves this by recording\nfull `rwx` mode bits in a `.gitperms` file committed to the repo -- permissions\ntravel with the code, per branch, just like everything else.\n\n## Usage\n\nOnce installed, `git-perms` is invoked as a git subcommand:\n\n```console\ngit perms save                        # scan tracked files -\u003e write .gitperms\ngit perms restore                     # read .gitperms -\u003e apply modes\ngit perms diff [--quiet]              # show/detect mode differences\ngit perms hook install                # install git hooks\ngit perms hook uninstall              # remove git hooks\ngit perms generate-completion \u003cshell\u003e # shell completions (bash, zsh, fish)\n```\n\n## Getting started\n\n```console\ncd my-repo\ngit perms hook install     # set up auto-save/restore hooks\ngit perms save             # record current permissions\ngit add .gitperms \u0026\u0026 git commit -m \"chore: track file permissions\"\n```\n\nFrom now on, permissions are automatically saved on commit and restored on\ncheckout, merge, or rebase.\n\n## The `.gitperms` file\n\nA plain-text file, one entry per line -- the octal mode followed by the path:\n\n```text\n0644 src/lib.rs\n0755 scripts/deploy.sh\n```\n\nCommit this file to your repository. Because it lives alongside your code, each\nbranch can carry its own set of permissions.\n\n## Configuration\n\nPre-commit behavior is controlled via `git config perms.preCommit`:\n\n| Value   | Behavior |\n|---------|----------|\n| `auto` (default) | Auto-save permissions and stage `.gitperms` before each commit. |\n| `warn`  | Print a warning if permissions differ from `.gitperms`, but allow the commit. |\n| `block` | Abort the commit if permissions differ from `.gitperms`. |\n\nExample:\n\n```console\ngit config perms.preCommit warn\n```\n\n## Installation\n\n### From source\n\n```console\ncargo install git-perms\n```\n\n### Via Homebrew (macOS)\n\n```console\nbrew install graelo/tap/git-perms\n```\n\n### From GitHub Releases\n\nDownload the appropriate binary from the\n[releases page](https://github.com/graelo/git-perms/releases) and place it in\nyour `$PATH`.\n\nTo install shell completions:\n\n```console\n$ git perms generate-completion zsh|bash|fish \u003e /path/to/your/completions/folder\n```\n\n## License\n\nLicensed under either of:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or\n  \u003chttps://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraelo%2Fgit-perms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraelo%2Fgit-perms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraelo%2Fgit-perms/lists"}