{"id":16242785,"url":"https://github.com/troian/git-templates","last_synced_at":"2025-04-08T10:45:30.738Z","repository":{"id":118632724,"uuid":"418513093","full_name":"troian/git-templates","owner":"troian","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-18T14:30:06.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T07:16:20.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/troian.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}},"created_at":"2021-10-18T13:26:13.000Z","updated_at":"2022-11-10T01:35:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"b808813b-7209-467d-bdc8-da25e7454e43","html_url":"https://github.com/troian/git-templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troian%2Fgit-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troian%2Fgit-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troian%2Fgit-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troian%2Fgit-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/troian","download_url":"https://codeload.github.com/troian/git-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247828180,"owners_count":21002970,"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":[],"created_at":"2024-10-10T14:12:46.648Z","updated_at":"2025-04-08T10:45:30.713Z","avatar_url":"https://github.com/troian.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git hooks templates\n\nThis repo automates installation and usage of various git hooks during `git init` or `git clone`\n\n## How to use it\n\n1. Clone this repo in to place of your choice. We will be using `~/.config/git-templates` in this example\n```shell\ngit clone https://github.com/troian/git-templates ~/.config/git-templates\n```\n\n2. Lets git know where to search for templates. In ~/.gitconfig add/edit `init` section\n```git\n[init]\n  templatedir = ~/.config/git-templates # \u003c--- this is what we add\n```\n\nNow, everytime repo is created or cloned git will install following files into repo's `.git` dir\n```\n.git/\n  configure.sh\n  update.sh\n```\n\n1. `configure.sh` - configures what hooks to use. simply call it `.git/configure.sh` and follow prompts to install hooks of your choice\n2. whenever hooks are updated in the upstream, call `.git/update.sh` to update them\n\n\n## How to add new hooks to this repo\n\n1. Create directory inside `hooks`. give it sensible name\n2. Create hook(s) files and make sure they are executable. Allowed hook types are: `commit-msg` `pre-commit` `post-commit` `pre-push` `post-push`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroian%2Fgit-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftroian%2Fgit-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroian%2Fgit-templates/lists"}