{"id":13528201,"url":"https://github.com/vmware-archive/git_scripts","last_synced_at":"2025-04-01T11:31:09.613Z","repository":{"id":707820,"uuid":"354403","full_name":"vmware-archive/git_scripts","owner":"vmware-archive","description":"Developer workflow convenience scripts","archived":true,"fork":false,"pushed_at":"2021-05-25T16:52:56.000Z","size":118,"stargazers_count":277,"open_issues_count":6,"forks_count":77,"subscribers_count":248,"default_branch":"master","last_synced_at":"2024-12-19T00:04:06.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vmware-archive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-10-29T18:32:36.000Z","updated_at":"2024-10-15T02:37:10.000Z","dependencies_parsed_at":"2022-07-07T14:31:13.314Z","dependency_job_id":null,"html_url":"https://github.com/vmware-archive/git_scripts","commit_stats":null,"previous_names":["pivotal/git_scripts"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fgit_scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fgit_scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fgit_scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fgit_scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmware-archive","download_url":"https://codeload.github.com/vmware-archive/git_scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246631782,"owners_count":20808753,"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-08-01T06:02:17.871Z","updated_at":"2025-04-01T11:31:09.354Z","avatar_url":"https://github.com/vmware-archive.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/pivotal/git_scripts.png)](https://travis-ci.org/pivotal/git_scripts)\n\n# Git Scripts\n\nThese scripts are helpers for managing developer workflow when using git repos hosted on GitHub.  Install as a rubygem and they can be run as standard git commands like `git about`.\n\n## Gem Installation\n\n    gem install pivotal_git_scripts\n\n## System Wide Installation\n\n    cd /usr/local/bin \u0026\u0026 curl -L http://github.com/pivotal/git_scripts/tarball/master | gunzip | tar xvf - --strip=2\n\n## git-about\n\n`git about` shows settings set by `git pair` and `git project`\n\n## git-pair\n\nConfigures git authors when pair programming.\n\n    git pair sp js\n    user.name=Josh Susser \u0026 Sam Pierson\n    user.email=pair+jsusser+sam@pivotallabs.com\n\n\nCreate a `.pairs` config file in project root or your home folder.\n\n    # .pairs - configuration for 'git pair'\n    pairs:\n      # \u003cinitials\u003e: \u003cFirstname\u003e \u003cLastname\u003e[; \u003cemail-id\u003e]\n      eh: Edward Hieatt\n      js: Josh Susser; jsusser\n      sf: Serguei Filimonov; serguei\n    email:\n      prefix: pair\n      domain: pivotallabs.com\n      no_solo_prefix: true\n    global: false  # Set to true for git-pair to change git configuration for all your projects\n\n\nBy default this affects the current project (`.git/config`).\nUse the `--global` option or add `global: true` to your `.pairs` file to set the global git configuration for all projects (`~/.gitconfig`).\n\nOptions are:\n\n    -g, --global                     Modify global git options instead of local\n    -v, --version                    Show Version\n    -h, --help                       Show this.\n    \nWhen you're done pairing, change git's configuration to use your personal details.\n\n    git pair \u003cyour-initials\u003e\n\n## git-pair-commit\n\nMakes a git commit as normal, but chooses one of the pair members randomly to get credit for the commit on github (by setting the author email to that member's email address). The author name on the commit will list all members of the pair, as usual.\n\nIf pair members have email addresses on different domains, you can specify them separately in your `.pairs` file.\n\n    pairs:\n      jd: Jane Doe\n      fb: Frances Bar\n    email_addresses:\n      jd: jane@awesome.local\n      fb: frances@foo.bar\n\n### Using git-pair-commit in RubyMine\nRubyMine already supports pointing at a custom location for your git executable in the Preferences -\u003e Version Control -\u003e Git\n![screen shot 2014-03-11 at 12 49 02 pm](https://f.cloud.github.com/assets/163532/2390097/49c3023e-a956-11e3-8aeb-dcba1a814309.png)\nThe trick then is that `pair-commit` doesn't encompass all git functionality, so you can't just point RubyMine directly at it, you need something in the middle that will use `pair-commit` if the first arg is `commit`, otherwise just pass through. Here's a ruby script to do just that:\n```ruby\n#!/usr/bin/env ruby\n\nexit_code = if ARGV[1] == \"commit\"\n  system \"git pair-commit #{ARGV[1..-1].join(\" \")}\"\nelse\n  system \"git #{ARGV.join(\" \")}\"\nend\n\nexit exit_code\n```\nMake sure it's executable.\n\n## git-project\n\n    $ git project pivots\n\nThis script sets the user account you will use to access repos hosted on github.com.  It creates a symlink from `id_github_current` to `id_github_pivotal\u003cproject\u003e`, which switches the SSH key you are currently using to access GitHub repos.  Make sure you have the following lines in your .ssh/config file:\n\n    Host github.com\n      User git\n      IdentityFile /Users/pivotal/.ssh/id_github_current\n\nAuthors\n====\nCopyright (c) 2010 [Pivotal Labs](http://pivotallabs.com). This software is licensed under the MIT License.\n\n### [Contributors](https://github.com/pivotal/git_scripts/contributors)\n - git-pair original author [Bryan Helmkamp](http://brynary.com)\n - lots of pivots :)\n - [James Sanders](https://github.com/jsanders)\n - [Todd Persen](https://github.com/toddboom)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmware-archive%2Fgit_scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmware-archive%2Fgit_scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmware-archive%2Fgit_scripts/lists"}