Cross-platform electron app, git-collab
, for managing git users while pair/mob programming
With the introduction of the switch
command to git 2.23.0, we have opted to rename to something that:
- Does not conflict with core git functionality/commands
- Expresses the true behavior and intent of the application, namely collaborative software development
Your existing ~/.git-switch/config.json
file will be copied to ~/.git-collab/config.json
to keep your configured users and repositories.
Any repositories initialized with the post-commit.git-switch
hook will be switched over to use the post-commit.git-collab
hook.
- You will find deployables for each of the 3 major platforms here.
- Install git-collab for your platform and run it.
- You should see a new tray item with the git-collab icon.
- Add your git repos and pair/mob users.
- Enjoy!
git-collab adds a post commit hook to the git repositories you specify.
You select the users to add to your pair/mob, and commit changes to your code.
With each commit, the git-collab commit hook amends the commit to designate the author separate from the co-author(s).
Once each commit is complete, git-collab will automatically rotate users in your pair/mob, so the next user will be the author on the next commit.
If you are using Windows Subsystem for Linux and you are not seeing co-authors applied with commits, you may need to symlink your global .gitconfig
in your Linux instance to point to your global .gitconfig
in Windows. i.e. You will want to run the following in your Linux shell:
rm ~/.gitconfig
ln -s /mnt/c/Users/<user>/.gitconfig ~/.gitconfig
Likewise, if you are making a commit from your Linux shell, the command issued to rotate users may not be able to run from the Linux shell, because it is a Windows .exe
, so you'll need to manually rotate users after commits.
git-collab will modify your ssh config (~/.ssh/config
) to specify the current author's identity file (RSA key).
By default, it does this for the github.com
host.
If you use a different host for your repository, you can provide the SSH Host
value, in the add/edit user form, that your identity file was issued for.
In addition to managing users and repositories in the electron client app, git-collab can also be used as a CLI i.e.
git-collab users add --name "<User Name>" --email "<[email protected]>"
git-collab repos list
Note: You will need to ensure git-collab
is in your PATH
. On MacOS it might look like this: sudo ln -s /Applications/git-collab.app/Contents/MacOS/git-collab /usr/local/bin/git-collab
The available command structure is:
git-collab
users
add (new)
edit (up, update)
remove (rm)
list (ls)
rotate (ro)
toggle (to)
repos
add (new)
remove (rm)
list (ls)
show
quit
Running -h
or --help
on any command/sub-command will provide usage information
To run git-collab from source, run the following command:
npm run build
npm run start
To launch the electron app with the chrome dev tools open by default, simply run:
npm run start:dev
- Increment the version in
package.json
(Appropriately following SemVer) - Tag the commit with
git tag <semver>
- Do not include a leading
v
in the tag name - ❌ v1.1.1
- ✅ 1.1.1
- Do not include a leading
- Push the tag to github
git push --tags
- A release will be automatically generated by this github action
- Add notes/changelog to the newly created release