rkotze / git-mob

Co-author commits tool. A cross-platform command-line tool for social coding. Includes co-authors in commits when pair/mob programming.
https://www.npmjs.com/package/git-mob
MIT License
182 stars 21 forks source link

Enable to kick out co-author from the current mob #130

Open niksumeiko opened 5 days ago

niksumeiko commented 5 days ago

Summary

Provide an option to kick out one/many co-authors you currently mob with.

# Started together
git mob ab hi jd

# Did some work, committed together
git commit -m "X"

# Then `jd` had to leave
# We want to kick out the `jd` and continue with the rest
git mob -jd

(notice the - hyphen before the initials)

Motivation

Describe alternatives you've considered

Currently, I am doing this by switching to solo mode and then re-adding all co-authors who continue the mob with me.

git mob ab hi jd
git commit -m "X"
git solo
git mob ab hi

Additional context

rkotze commented 4 days ago

Hi @niksumeiko

Thanks for your suggestion and listing the current commands you are using.

When changing co-authors you don't need to run solo. Git mob followed by initials will reset to those selected authors.

I don't think this feature is needed as you could workaround with cmd history and remove the initials from the command.

Let me know if you still believe there is good value in adding this feature.

niksumeiko commented 2 days ago

Hi @rkotze, this demands re-typing all initials of the co-authors that continue in the mob. It might be fine when multiple co-authors leave the mob. In my experience, more often, people drop the mob one by one. Therefore, git mob -jd would be a simplifier, a shortcut.

Because with retyping, too many keystrokes are involved:

  1. Retype all of the co-authors that continue in the mob:

    g mob jd ak ab hr ur
  2. Use bash history:

    • Retrieve previously typed line from bash history ( keyup on Mac)
      It might require multiple hits if there's something in between)
    • Move cursor left to delete some initials (many keystrokes)

Yes, these workarounds are there, but g mob -jd would certainly be a shorthand.