Code Monkey home page Code Monkey logo

git-mob's Introduction

Git Mob npm version build status

A command-line tool for social coding

Includes co-authors in commits when you collaborate on code. Use when pairing with a buddy or mobbing with your team.

Read our blog post to find out why git-mob exists: http://tech.findmypast.com/co-author-commits-with-git-mob

gif showing example usage of git-mob

Install

Warning: This package hasn't reached v1.0.0 yet. There may be many missing features, lots of bugs, and the API could change until we reach a stable version.

git-mob is a CLI tool, so you'll need to install the package globally.

npm i -g git-mob

Workflow / Usage

With git-mob, the primary author will always be the primary user of the computer. Set your author info in git if you haven't done so before.

$ git config --global user.name "Jane Doe"
$ git config --global user.email "[email protected]"

To keep track of potential co-authors, git-mob uses a JSON file called ~/.git-coauthors. Here's a template of its structure.

{
  "coauthors": {
    "initials": {
      "name": "<name>",
      "email": "<email>"
    }
  }
}

Start by adding a few co-authors that you work with.

$ cat <<-EOF > ~/.git-coauthors
{
  "coauthors": {
    "ad": {
      "name": "Amy Doe",
      "email": "[email protected]"
    },
    "bd": {
      "name": "Bob Doe",
      "email": "[email protected]"
    }
  }
}
EOF

You're ready to create your mob. Tell git-mob you're pairing with Amy by using her initials.

$ git mob ad
Jane Doe <[email protected]>
Amy Doe <[email protected]>

Commit like you normally would. You should see Co-authored-by: Amy Doe <[email protected]> appear at the end of the commit message.

Let's add Bob to the group to create a three-person mob.

$ git mob ad bd
Jane Doe <[email protected]>
Amy Doe <[email protected]>
Bob Doe <[email protected]>

Once you're done mobbing, switch back to developing solo.*

$ git solo
Jane Doe <[email protected]>

* If you have git-duet installed, you'll need to uninstall it since it conflicts with the git-solo command.

Find out more with git mob --help

git-mob's People

Contributors

dideler avatar rkotze avatar sarabadu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.