VS Code extension to add multiple co-authors to commits, managed all from the source control tab.
Great extension when pair programming or mobbing with your team. Requires Git Mob cli
The Git Mob project for VS code co-author commits
Read our blog post to find out learn more about Git Mob.
Git Mob Cli is needed and supports:
- Global install
npm i -g git-mob
- Dev dependency
npm i -D git-mob
(See git-mob for more info)
Search for "git-mob" in Extensions and click install.
Ensure you have set your primary author in Git
$ git config --global user.name "Jane Doe" $ git config --global user.email "email@example.com"
- Manage & view all your co-authors in source control tab
- Search GitHub for co-authors, see setting options to learn more.
- Change primary author from co-author list
- Search suggested co-authors from the "More Authors" list (all contributors to the repository)
- Add new co-authors and manage them in
- Add new co-authors from current repository into your
- Git emojis search and select Gitmojis
- VS Code workspace support
- Select multiple co-authors (shift or ctrl) to be added to commit
- Auto reload when updating
.git-coauthorsfile in VS Code
- Configurable see setting options
prepare-commit-msg hook support removed in
Add new co-authors
⌘+⇧+p and search for "Add new co-author". Fill in all input fields.
ctrl+shift+p -> "Open .git-coauthors file")
Option 2: Add your co-authors to the
.git-coauthors files in your user folder.
Add new co-authors from repository
Click the plus + button on an author in More Authors list.
Search suggested co-authors
Click the search icon on the More Authors section or
⌘+⇧+p and search for "Search suggested co-authors".
Select one of multiple open Git repositories and add co-author metadata to source control input field.
Using the standardised list from Gitmoji.
Search and select an emoji to add to the Git message input field
Change primary author
Post commit -> Solo
After a commit remove selected co-authors from input to unselected. If you commit in the command-line the UI will update as well.
Author list -> Expand more authors
Expand 'More Authors' tree when UI starts.
Github -> Personal Access Token
Search for co-authors on GitHub you will need to generate a PAT.
- Visit GitHub > settings > tokens
- Click "generate new token"
- Select "user:read" (This allows GitMob to fetch a users public email)