Mob
Tool for smooth git handover.
Install / Use
/learn @remotemobprogramming/MobREADME
Fast git handover with mob
#StandWithUkraine donate here #StandWithUkraine
Fast git handover for remote pair/mob programming.
- mob is an open source command line tool written in go
- mob is the fastest way to hand over code via git
- mob keeps your branches clean and only creates WIP commits on temporary branches
- mob has a shared team timer timer.mob.sh
- mob is on 'assess' in the Thoughtworks Technology Radar
- mob has VSCode integration
What people say about mob
Sometimes you come across a tool that you didn't realize you needed until you do; mob is just such a tool. Living as we do in a world where remote pair programming has become the norm for many teams, having a tool that allows for seamless handover either between pairs or a wider group as part of a mob programming session is super useful. mob hides all the version control paraphernalia behind a command-line interface that makes participating in mob programming sessions simpler. It also provides specific advice around how to participate remotely, for example, to "steal the screenshare" in Zoom rather than ending a screenshare, ensuring the video layout doesn't change for participants. A useful tool and thoughtful advice, what's not to like? — Technology Radar Volume 25, thoughtworks
"Mob has allowed us to run fast-paced, engaging, and effective sessions by enabling sub-10-second handover times and otherwise getting out of the way. A simple but great tool!" — Jeff Langr, developer
"I love it, it is a quantum leap in our collaboration." — Vasiliy Sivovolov, Senior Software Engineer
"What a great tool to organise remote working." — Jennifer Gommans, IT Consultant
"I was recently introduced to mob.sh for remote pairing/mobbing collaboration and I absolutely love it. The timer feature is really a selling point for me. Kudos" — Fabien Illert, IT Consultant
How to install
The recommended way to install mob is as a binary via the provided install script:
# Works for macOS, Linux, and even on Windows in Git Bash
curl -sL install.mob.sh | sh
On macOS via Homebrew:
brew install mob
On Windows via Scoop:
scoop install mob
or via Chocolatey:
choco install mob
On Arch Linux via yay:
yay -S mobsh-bin
On Nix through declarative installation:
{ pkgs, ... }:
{
# Either for all users
environment.systemPackages = with pkgs; [ mob ];
# Or for an explicit user
users.users."youruser".packages = with pkgs; [ mob ];
}
On NetBSD, macOS, SmartOS, Linux, FreeBSD, OpenBSD, and more, via pkgsrc:
# If there's a binary package for your platform
pkgin install mob
# Otherwise, for any platform
cd pkgsrc/devel/mob && bmake install clean
On Ubuntu there's an EXPERIMENTAL snap package with a known limitation (ssh-agent not working):
sudo snap install mob-sh
sudo snap connect mob-sh:ssh-keys
Using go tools
If you have go 1.20+ you can install and build directly from source:
go install github.com/remotemobprogramming/mob/v4@latest
or pick a specific version:
go install github.com/remotemobprogramming/mob/v4@v4.4.0
or to install latest unreleased changes:
go install github.com/remotemobprogramming/mob/v4@main
How to use
You only need three commands: mob start, mob next, and mob done.
Switch to a separate branch with mob start and handover to the next person with mob next.
Repeat.
When you're done, get your changes into the staging area of the main branch with mob done and commit them.
Here's a short example on how the two developers Carola and Maria code a feature together and push it in the end.
# Carola
main $ mob start
mob/main $ echo "hello" > work.txt
mob/main $ mob next
# Maria
main $ mob start
mob/main $ cat work.txt # shows "hello"
mob/main $ echo " world" >> work.txt
mob/main $ mob next
# Carola
mob/main $ mob start
mob/main $ cat work.txt # shows "hello world"
mob/main $ echo "!" >> work.txt
mob/main $ mob done
main $ git commit -m "create greeting file"
main $ git push
And here's the man page of the tool:
mob enables a smooth Git handover
Basic Commands:
start start session from base branch in wip branch
next handover changes in wip branch to next person
done squashes all changes in wip branch to index in base branch
reset removes local and remote wip branch
clean removes all orphan wip branches
Basic Commands(Options):
start [<minutes>] Start a <minutes> timer
[--include-uncommitted-changes|-i] Move uncommitted changes to wip branch
[--discard-uncommitted-changes|-d] Discard uncommitted changes
[--branch|-b <branch-postfix>] Set wip branch to 'mob/<base-branch>-<branch-postfix>'
[--create|-c] Create the remote branch
[--room <room-name>] Set room name for timer.mob.sh once
next
[--stay|-s] Stay on wip branch (default)
[--return-to-base-branch|-r] Return to base branch
[--message|-m <commit-message>] Override commit message
done
[--no-squash] Squash no commits from wip branch, only merge wip branch
[--squash] Squash all commits from wip branch
[--squash-wip] Squash wip commits from wip branch, maintaining manual commits
reset
[--branch|-b <branch-postfix>] Set wip branch to 'mob/<base-branch>/<branch-postfix>'
goal Gives you the current goal of your timer.mob.sh room
[<your-goal>] Sets the goal of your timer.mob.sh room
[--delete] Deletes the goal of your timer.mob.sh room
Timer Commands:
timer <minutes> Start a <minutes> timer
[--room <room-name>] Set room name for timer.mob.sh once
timer open Opens the timer website
[--room <room-name>] Set room name for timer.mob.sh once
start <minutes> Start mob session in wip branch and a <minutes> timer
break <minutes> Start a <minutes> break timer
goal Gives you the current goal of your timer.mob.sh room
[<your-goal>] Sets the goal of your timer.mob.sh room
[--delete] Deletes the goal of your timer.mob.sh room
Short Commands (Options and descriptions as above):
s alias for 'start'
n alias for 'next'
d alias for 'done'
b alias for 'branch'
t alias for 'timer'
g Alias for 'goal'
Get more information:
status show the status of the current session
fetch fetch remote state
branch show remote wip branches
config show all configuration options
version show the version
help show help
Other
moo moo!
Add --debug to any option to enable verbose logging
Examples:
# start 10 min session in wip branch 'mob-session'
mob start 10
# start session in wip branch 'mob/<base-branch>/green'
mob start --branch green
# handover code and return to base branch
mob next --return-to-base-branch
# squashes all commits and puts changes in index of base branch
mob done
# make a sound check
mob moo
If you need some assistance when typing the subcommands and options, you might want to have a look at fig which gives you autocompletion in your shell.
Best Practices
- Say out loud
- Whenever you key in
mob nextat the end of your
- Whenever you key in
