{"id":15429525,"url":"https://github.com/stevenharman/git_tracker","last_synced_at":"2025-04-05T13:08:34.835Z","repository":{"id":2783175,"uuid":"3782774","full_name":"stevenharman/git_tracker","owner":"stevenharman","description":"Some simple tricks that make working with Pivotal Tracker even better... and easier... um, besier!","archived":false,"fork":false,"pushed_at":"2020-10-31T00:24:58.000Z","size":196,"stargazers_count":170,"open_issues_count":3,"forks_count":11,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-14T10:16:07.030Z","etag":null,"topics":["git","git-hook","pivotal-tracker","ruby","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/stevenharman/git_tracker","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"helone/num2text","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stevenharman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-21T02:54:17.000Z","updated_at":"2023-09-16T01:42:06.000Z","dependencies_parsed_at":"2022-08-25T17:02:11.028Z","dependency_job_id":null,"html_url":"https://github.com/stevenharman/git_tracker","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenharman%2Fgit_tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenharman%2Fgit_tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenharman%2Fgit_tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenharman%2Fgit_tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevenharman","download_url":"https://codeload.github.com/stevenharman/git_tracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339158,"owners_count":20923014,"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":["git","git-hook","pivotal-tracker","ruby","workflow"],"created_at":"2024-10-01T18:11:23.314Z","updated_at":"2025-04-05T13:08:34.802Z","avatar_url":"https://github.com/stevenharman.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitTracker\n\n[![Gem Version](https://badge.fury.io/rb/git_tracker.svg)](https://badge.fury.io/rb/git_tracker)\n[![Build Status](https://travis-ci.org/stevenharman/git_tracker.svg?branch=master)](https://travis-ci.org/stevenharman/git_tracker)\n[![Maintainability](https://api.codeclimate.com/v1/badges/de85f5c6634d8e69c69a/maintainability)](https://codeclimate.com/github/stevenharman/git_tracker/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/de85f5c6634d8e69c69a/test_coverage)](https://codeclimate.com/github/stevenharman/git_tracker/test_coverage)\n\n*GitTracker*, or *git-tracker*, is a Git hook that will scan your current\nbranch name looking for something it recognizes as a [Pivotal Tracker][pt]\nstory number. If it finds one, it will automagically add it, in the [special\nformat][pt-format], to your commit message.\n\n## Installation\n\n### 1) Install the `git-tracker` binary\n\nYou need to get the `git-tracker` binary onto your system.\n\n- via [Homebrew][homebrew] :beers: (preferred)\n\n  ```bash\n  $ brew install git-tracker\n  ```\n\n- via [RubyGems][rubygems] :pensive: (if you must)\n\n  ```bash\n  $ gem install git_tracker\n  ```\n\n### 2) Initialize the hook\n\nThen you need to initialize the *git hook* into each local Git repository where\nyou want to use it.\n\n```bash\n# from inside a local Git repository\n# for example: /path/to/repo/\n$ git tracker init\n```\n\nThis will put the `prepare-commit-msg` hook in the `/path/to/repo/.git/hooks`\ndirectory and make it executable.\n\n**NOTE:** The hook needs to be initialized just once for each repository in\nwhich you will use it.\n\n## Usage\n\nWith the hook initialized in a repository, create branches being sure to include\nthe Pivotal Tracker story number in the branch name.\n\n```bash\n$ git checkout -b a_useful_and_helpful_name_8675309\n```\n\nWhen you commit, Git will fire the hook which will find the story number in the\nbranch name and prepare your commit message so that it includes the story number\nin the [special Pivotal Tracker syntax][pt-format].\n\n```bash\n# on branch named `best_feature_ever-8675309`\n$ git commit\n```\n\nWill result in a commit message something like: *(notice the two empty lines at\nthe top)*\n\n```diff\n\n\n[#8675309]\n# Please enter the commit message for your changes. Lines starting\n# with '#' will be ignored, and an empty message aborts the commit.\n# On branch best_feature_ever-8675309\n# Changes to be committed:\n#   (use \"git reset HEAD \u003cfile\u003e...\" to unstage)\n#\n# new file:   feature.rb\n#\n\n```\n\nYou should then add a [useful and responsible commit message][tpope]. :heart:\n\n### Passing commit messages via command line\n\nIf you pass a commit message on the command line the hook will still add the\nstory number, preceded by an empty line, to the end of your message.\n\n```bash\n# on branch named `best_feature_ever-8675309`\n$ git commit -m'Look at this rad code, yo!'\n```\n\nResults in this commit message:\n\n```\nLook at this rad code, yo!\n\n[#8675309]\n```\n\nHowever, if you include the story number in the Pivotal Tracker format within\nyour commit message, the hook will do nothing.\n\n```bash\n# on branch named `best_feature_ever-8675309`\n$ git commit -m'[#8675309] Look at this rad code, yo!'\n```\n\nResults in this commit message:\n\n\n```\n[#8675309] Look at this rad code, yo!\n```\n\n### Keywords\nYou can use the custom keywords that Pivotal Tracker provides with the API.\n\nThe keywords are `fixed`, `completed`, `finished`, and `delivered` in square\nbrackets. You may also use different cases and forms of these verbs, such as\n`Fix` or `FIXES`.\n\nIf you use those keywords in your commit message, the keyword will be prepended\nto the story ID in the commit message.\n\nFor example:\n\n```bash\n# on branch named `bug/redis_connection_not_initializing_8675309`\n$ git commit -am \"Change the redis connection string [Fixes]\"\n```\n\nResults in this commit message:\n\n```bash\nChange the redis connection string [Fixes]\n\n[Fixes #8675309]\n```\n\n### Valid branch names\n\n*GitTracker* allows you to include the story number any where in the branch\nname, optionally prefixing it with a hash (`#`). Examples:\n\n  - `best_feature_ever_#8675309`\n  - `best-feature-ever-8675309`\n  - `8675309_best_feature_ever`\n  - `#8675309-best-feature-ever`\n  - `your_name/8675309_best_feature_ever`\n  - `your_name/#8675309_best_feature_ever`\n\n## Contributing :octocat:\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my_new_feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my_new_feature`)\n5. Create new Pull Request\n\n\n[pt]: https://www.pivotaltracker.com/\n[pt-format]: https://www.pivotaltracker.com/help/api?version=v3#scm_post_commit_message_syntax\n[tpope]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html\n[homebrew]: http://mxcl.github.com/homebrew\n[rubygems]: http://rubygems.org/gems/git_tracker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenharman%2Fgit_tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenharman%2Fgit_tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenharman%2Fgit_tracker/lists"}