An implementation of git-mob in Rust
Go to file
Martin Frost 5f88d5a029 v0.3.0 - Override main author
This change allows the `-o <initials>` flag to override who the main
author of any commits in this repo will be going forward.

What this actually does, is that it modifies the Repository's config
file to change the `user.name` and `user.email` like this.

Running `git mob -o ae be` (given the corresponding authors have been
configured using `git add-coauthor`) is equivalent to doing:

    git config user.name "Alice Example"
    git config user.email "alice@example.com"
    git mob be # be being the initials of "Bob Example" <bob@example.com>
2020-06-19 13:38:04 +02:00
src v0.3.0 - Override main author 2020-06-19 13:38:04 +02:00
.gitignore Add working version of git-solo 2020-05-23 20:56:32 +02:00
.travis.yml Add TravisCI config 2020-05-23 23:41:18 +02:00
Cargo.lock Update lockfile dependencies 2020-06-19 13:38:04 +02:00
Cargo.toml v0.3.0 - Override main author 2020-06-19 13:38:04 +02:00
LICENSE Initial commit 2020-05-23 20:54:38 +02:00
README.md v0.3.0 - Override main author 2020-06-19 13:38:04 +02:00

README.md

Git-mob

A command-line tool for social coding


This is a CLI tool for including your co-authors in your commits.

It is essentially a Rust clone of the git-mob NPM package.

Install

Just run cargo install git_mob and you should be all set.

Examples

  • Add Alice, Bob, and yourself as a possible co-authors:

    git add-coauthor a "Alice" alice@example.com
    git add-coauthor b "bob" Bob@example.com
    git add-coauthor me "me" myself.i@example.com
    
  • Set Alice as co-author, making your mob consist of you and Alice:

    git mob a
    
  • Set both Alice and Bob as co-authors, making your mob consist of the three of you:

    git mob a b
    
  • Set Alice as the main author for any commits you make, since she is the one doing most of the thinking anyway, and add yourself as a mob member:

    git mob -o a b me
    
  • Edit Bob's name, since you accidentally capitalized his email instead of his name:

    git edit-coauthor b --name "Bob" --email bob@example.com
    
  • Remove Bob as a possible co-author:

    git delete-coauthor b
    
  • List all available co-authors:

    git mob -l
    
  • Go back to coding by yourself again:

    git solo
    

Working features

  • git mob <co-author-initials>
  • git add-coauthor <initials> "Co-author Name" <co-author-email-address>
  • git -o <initials> for overwriting the main author
  • git edit-coauthor [--name "Co-author Name"] [--email <co-author-email-address>]
  • git delete-coauthor <initials>
  • git mob -l
  • git solo

TODO

There are some missing features from the original NPM package, that are yet to be implemented, and then there is also a severe lack of tests and documentation.

Missing features

  • git mob-print
  • git suggest-coauthors
  • --installTemplate and --uninstallTemplate for prepare-commit-msg

Why clone an existing, working CLI tool?

Basically, I was looking for some decent size project to write in Rust, and I didn't have any other ideas.

The NPM package works just fine. There's just one thing that annoys me about it, and that is that I have to install it in once for every node version that is used in any repo I work in. With this approach, I only need to install it once.