mob
mob copied to clipboard
See changes in changelist rather than buried in wip commits
I love using the mob tool! It is the most convenient way to hand code between team members, and quite intuitive to use.
One thing that I would like is to be able to see the changes made as part of a mob session as uncommitted changes so I have the changelist in Intellij.
At the moment:
Tom
mob start
// make some changes
mob next
Dick
mob start
git status
On branch mob/main-xxxxx
Your branch is up to date with 'origin/mob/main-xxxxx'.
nothing to commit, working tree clean
Harry
wtf????
Whereas I would like to see all the changes. To get round this I usually mob done to squash and unwrap the commits, then mob start and mob next at the end to hand it over but that is a faff.
Is there anything that might help this situation already? If not, I wonder if there could be a -- tag on start to keep the changes uncommitted. Maybe --maintain-changelist/-m? I understand this might have knock-on effects on how mob next would work, but interested to hear your thoughts.
Thank you very much!
Hi @olliekennedy
Did you try mob done --squash-wip ?
Hey @gregorriegler I am talking about being able to see what changes have been made while still actively mobbing and I’m not ready to mob done. Seeing what has changed since my last actual commit would be useful.
I think I understand you now.
You want, that whenever you do mob start, you are able to see the previous changes "staged" rather than "commited". And you want that, so you can easily see all the changes the mob made so far using git diff, and maybe, you would like the ability to git restore some file?
Imagining a change where every time you mob start everything is squashed and staged, this would mean that when you push, you would have to force push, as you are changing the history on the remote. Same with pulling. Instead of adding new wip commits you would constantly change the same existing wip commit.
But I would not want to loose manual commits. You could just squash everything up until the last manual commit. So only wip commits should be squashed.
Another thought: If you work a long time in the same session, and you keep squashing, what if someone accidentally resets. The changes are gone. Well, they're still there on the remote unless you force push.
I don't think its impossible to do it. There are some consequences. And it is quite a change to how mob works now. Would love to hear @simonharrer and @hollesse opinion