• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

remotemobprogramming/mob: Tool for smooth git handover.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

remotemobprogramming/mob

开源软件地址:

https://github.com/remotemobprogramming/mob

开源编程语言:

Go 93.1%

开源软件介绍:

Fast git handover with mob

mob Logo

Test Workflow Contributors Downloads Downloads of latest Stars

#StandWithUkraine donate here #StandWithUkraine

Fast git handover for remote pair/mob programming.

diagram how mob works

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

"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 remotemobprogramming/brew/mob

# upgrade to latest version
brew upgrade remotemobprogramming/brew/mob

On Windows via Scoop:

scoop 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 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.16+ you can install and build directly from source:

go install github.com/remotemobprogramming/mob/v3@latest

or pick a specific version:

go install github.com/remotemobprogramming/mob/[email protected]

or to install latest unreleased changes:

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.

asciicast

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.
  • Set up a global shortcut for screensharing
  • 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)
  • Mona steals screenshare using keyboard shortcut, and, afterwards, runs mob start
  • Maria checks her twitter

Complementary Scripts

mob-start feature1 creates a new base branch feature1 to immediately start a wip branch mob/feature1 from there.

mob-start() { git checkout -b "$@" && git push origin "$@" --set-upstream && mob start --include-uncommitted-changes; }

Useful Aliases

alias ms='mob start'
alias mn='mob next'
alias md='mob done'
alias moo='mob moo'

Use the name you like


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mirror/wget: Wget Git mirror发布时间:2022-06-11
下一篇:
opendigg/awesome-github-wechat-weapp: 微信小程序开源项目库汇总发布时间:2022-06-11
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap