{"id":16726845,"url":"https://github.com/sadir/git-pairing-session","last_synced_at":"2025-10-16T05:58:55.716Z","repository":{"id":132390394,"uuid":"121054413","full_name":"sadir/git-pairing-session","owner":"sadir","description":"Attribute git commits to more than one author when you are pair-programming :family: :pear:","archived":false,"fork":false,"pushed_at":"2018-02-21T10:24:30.000Z","size":16,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T09:21:09.765Z","etag":null,"topics":["bash","command-line","command-line-tool","git","pair-programming","pairing","pear","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/sadir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-02-10T21:08:34.000Z","updated_at":"2024-05-28T16:17:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"309ab9e7-fa89-4251-9f52-3d2d311949ea","html_url":"https://github.com/sadir/git-pairing-session","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/sadir%2Fgit-pairing-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadir%2Fgit-pairing-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadir%2Fgit-pairing-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadir%2Fgit-pairing-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sadir","download_url":"https://codeload.github.com/sadir/git-pairing-session/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"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":["bash","command-line","command-line-tool","git","pair-programming","pairing","pear","shell"],"created_at":"2024-10-12T22:54:32.590Z","updated_at":"2025-10-16T05:58:50.657Z","avatar_url":"https://github.com/sadir.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Pairing Session\n\nA mini set of shell scripts to enable you to take advantage of [commits with coauthors](https://github.com/blog/2496-commit-together-with-co-authors) in Github.\n\n![github coauthored commit screenshot](https://i.imgur.com/2Yu1IdT.png)\n## Why pair?\n\nSee my [blog post](https://tech.nested.com/pair-programming-and-github-coauthors-85028923b238) on the benefits of pair programming.\n\n## Why record coauthors?\n\n  * [Chris Beams](https://chris.beams.io/posts/git-commit/) does a great job of explaining why good git commits are important. Git coauthors extend all the points he makes.\n  * Those sweet, sweet, contribution points. :green_heart:\n\n## Installation\n\n1. Clone this repo into your home directory. :house:\n\n```\ngit clone https://github.com/sadir/git-pairing-session.git $HOME/\n```\n\n2. Add the `git-pairing-session` script to your bash config (e.g. in `~/.bash_profile` or `~/.bashrc`).\n\n```\nsource $HOME/git-pairing-session/git-pairing-session\n```\n\n3. Setup your colleagues so `git-pairing-session` knows who you can :pear: with.\n\n```\nadd_colleague ms \"Morgan Sadr-Hashemi\" \"morgan@example.com\"\n```\n\nNote: [your colleagues email addresses must match their github email](https://help.github.com/articles/creating-a-commit-with-multiple-authors/).\n\nYou can remove colleagues too if they abandon you:\n\n```\nremove_colleague ms\n```\n\n## Usage\n\nThere are two options:\n\n  1. Record your coauthor as you go.\n  2. Retrospectively modify your branch to add your coauthor to every commit.\n\n### Option 1\n\n1. Set up your project to be ready for recording coauthors as you go, by running this command in the root of your project (where your `.git` directory is).\n\n```\npairing_project # symlinks a git hook to append authors to your commit messages.\n```\n\nNote: this will ask your permission to override your current `prepare-commit-msg` git hook if you have one.\n\n2. Get pairing with someone! :muscle:\n\n```\npairing_with ms # hand it a set of initials you set up earlier\n```\n\n3. When you're done, stop recording your coauthor.\n\n```\nno_longer_pairing\n```\n\n4. Eat more fruit :pear: :grapes: :tangerine: :green_apple: :banana: :cherries:\n\n### Option 2\n\n1. Do your work, blissfully unaware that you've forgotten to record your coauthor.\n\n2. Retrospectively amend your branch to add coauthors.\n\n```\npaired_with ms\n```\n\n3. Eat more fruit :pear: :grapes: :tangerine: :green_apple: :banana: :cherries:\n\n## Customisation\n\nSet this variable if you cloned the repo somewhere else:\n\n```\nexport GIT_PAIR_SESSION_DIR=$HOME/git-pairing-session\n```\n\n## Why this repo? Why not `other-repo`?\n\nI had a look at a few of these:\n\n* [pivotal/git-scripts](https://github.com/pivotal/git_scripts)\n\nThis one randomly attributes the commit to one member of the pair. I wanted each commit to be attributed to both.\n\n* [chrisk/git-pair](https://github.com/chrisk/git-pair)\n\nThis one put both co-authors in as the commiter but that broke the way that github represented commiters. Git the vcs wasn't set up for that.\n\n* [peterjwest/git-pair](https://github.com/peterjwest/git-pair)\n\nSimilar to git-pair, with added downsides of not being maintained and I quite wanted something in shell script without any dependencies other than Git, rather than using JS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsadir%2Fgit-pairing-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsadir%2Fgit-pairing-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsadir%2Fgit-pairing-session/lists"}