Swift git handover with 'mob'.
- mob is an open source command line tool written in go
- mob is the fastest way to hand over code via git and feels ubersmooth
- mob works on every platform, even Apple Silicon
- mob keeps your branches clean and only creates WIP commits on temporary wip branches
- mob supports multiple wip branches per base branch
- mob notifies you when it's time to handover
- mob can moo
"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!"
"I love it, it is a quantum leap in our collaboration."
— Vasiliy Sivovolov, Senior Software Engineer
"What a great tool to organise remote working."
curl -sL install.mob.sh | sh
If you are under Windows, you can use git bash
to install mob
.
You can also install it on macOS via homebrew:
brew install remotemobprogramming/brew/mob
If you want to update to the latest version using Homebrew
brew upgrade remotemobprogramming/brew/mob
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 master
branch with mob done
and commit them.
mob enables a swift Git handover
Basic Commands:
start start mob 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
Basic Commands(Options):
start [<minutes>] Start a <minutes> timer
[--include-uncommitted-changes|-i] Move uncommitted changes to wip branch
[--branch|-b <branch-postfix>] Set wip branch to 'mob/<base-branch>/<branch-postfix>'
next
[--stay|-s] Stay on wip branch (default)
[--return-to-base-branch|-r] Return to base banch
[--message|-m <commit-message>] Override commit message
done
reset
[--branch|-b <branch-postfix>] Set wip branch to 'mob/<base-branch>/<branch-postfix>'
Timer Commands:
timer <minutes> start a <minutes> timer
start <minutes> start mob session in wip branch and a timer
Get more information:
status show the status of the current mob session
config show all configuration options
version show the version of mob
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
mob start
creates branchmob-session
and pulls fromorigin/mob-session
mob next
pushes all changes toorigin/mob-session
in amob next [ci-skip]
commitmob done
squashes all changes inmob-session
into staging ofmaster
and removesmob-session
andorigin/mob-session
mob timer 10
start a ten minute timermob start 10
combines mob start and mob timer 10mob status
display the mob session status and all the created WIP commitsmob reset
deletesmob-session
andorigin/mob-session
mob config
print configuration
If you're using Zoom for screen sharing, here's a tip on how to speed up the Git Handover even further: We recommend configuring the global hotkey for toggling screen sharing in zoom in (Zoom > Preferences > Keyboard Shortcuts). So you can start and stop screen sharing anytime. More tips on setting up Zoom for effective screen sharing.
On Windows, if you use Scoop then just download the mob.json file, open a PowerShell terminal in that directory and:
scoop install mob
To get the timer to play "mob next" on your speakers when your time is up, you'll need an installed speech engine. Install that on Debian/Ubuntu/Mint as follows:
sudo apt-get install espeak-ng-espeak mbrola-us1
Create a little script in your $PATH
called say
with the following content:
#!/bin/sh
espeak -v us-mbrola-1 "$@"
Show your current configuration with mob config
:
MOB_REMOTE_NAME=origin
MOB_WIP_COMMIT_MESSAGE=mob next [ci-skip]
MOB_VOICE_COMMAND=say
MOB_NOTIFY_COMMAND=/usr/bin/osascript -e 'display notification "%s"'
MOB_NEXT_STAY=true
MOB_START_INCLUDE_UNCOMMITTED_CHANGES=false
MOB_DEBUG=false
MOB_WIP_BRANCH_QUALIFIER=
MOB_WIP_BRANCH_QUALIFIER_SEPARATOR=-
Override default value permanently via environment variables:
export MOB_DEBUG=true
Override default value just for a single call:
MOB_DEBUG=true mob next
Propose your change in an issue or directly create a pull request with your improvements.
git version # >= 2.17
go version # >= 1.15
go build # builds 'mob'
go test # runs all tests
go test -run TestDetermineBranches # runs the single test named 'TestDetermineBranches'
# run tests and show test coverage in browser
go test -coverprofile=cover.out && go tool cover -html=cover.out
- mob is a thin wrapper around git.
- mob is not interactive.
- mob owns its wip branches. It will create wip branches, make commits, push them, but also delete them.
- mob requires the user to do changes in non-wip branches.
- mob provides a copy'n'paste solution if it encounters an error.
- mob relies on information accessible via git.
- mob provides only a few environment variables for configuration.
- mob only uses the Go standard library and no 3rd party plugins.
Developed and maintained by Dr. Simon Harrer.
Contributions and testing by Jochen Christ, Martin Huber, Franziska Dessart, Nikolas Hermann and Christoph Welcz. Thank you!
Logo designed by Sonja Scheungrab.
<script async defer src="https://cdn.simpleanalytics.io/hello.js"></script><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>