mob has an extension in VSCode to use mob.sh via GUI Mob VSCode GUI
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
Volumne 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
"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 remotemobprogramming/brew/mob
# upgrade to latest version
brew upgrade remotemobprogramming/brew/mob
{ pkgs,... }:
{
# Either for all usersenvironment.systemPackages=withpkgs; [ mob ];
# Or for an explicit userusers.users."youruser".packages=withpkgs; [ mob ];
}
On Ubuntu there's an EXPERIMENTAL snap package with a known limitation (ssh-agent not working):
go install github.com/remotemobprogramming/mob/v3@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
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 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>'
clean Removes all orphan wip branches
Timer Commands:
timer <minutes> start a <minutes> timer
start <minutes> start mob session in wip branch and a <minutes> timer
break <minutes> start a <minutes> break timer
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'
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 next at the end of your turn or mob start at the beginning of your turn say the command out loud.
Why? Everybody sees and also hears whose turn is ending and whose turn has started. But even more important, the person whose turn is about to start needs to know when the previous person entered mob next so they get the latest commit via their mob start.
Steal the screenshare
After your turn, don't disable the screenshare. Let the next person steal the screenshare. (Requires a setting in Zoom)
Why? This provides more calm (and less diversion) for the rest of the mob as the video conference layout doesn't change, allowing the rest of the mob to keep discussing the problem and finding the best solution, even during a Git handover.
Share audio
Share your audio when you share your screen.
Why? Sharing audio means everybody will hear when the timer is up. So everybody will help you to rotate, even if you have missed it coincidentally or deliberately.
Use a timer
Always specify a timer when using mob start (for a 5 minute timer use mob start 5)
Why? Rotation is key to good pair and mob programming. Just build the habit right from the start. Try to set a timer so everybody can have a turn at least once every 30 minutes.
Why? This is just much faster than using the mouse.
Set your editor to autosave
Have your editor save your files on every keystroke automatically. IntelliJ products do this automatically. VS Code, however, needs to be configured via "File > Auto Save toggle".
Why? Sometimes people forget to save their files. With autosave, any change will be handed over via mob next.
The Perfect Git Handover
The perfect git handover is quick, requires no talking, and allows the rest of the team to continue discussing how to best solve the current problem undisturbed by the handover. Here's how to achieve that.
Situation Maria is typist sharing the screen, Mona is next
Maria runs mob next
keeps sharing the screen with the terminal showing the successful run of mob next
does nothing (i.e., no typing, no mouse cursor movement, no window switching)
请发表评论