Is your feature request related to a problem? Please describe.
When running git mob init the init command should be smart enough to respect existing hook scripts, and when uninstalling git-mob the hook scripts should be smart enough to avoid failing when git-mob is not found in the PATH.
Describe the solution you'd like
The first part might be addressed by adding a default failure method when the relevant hook scripts already exist, then enhancing the init command with some additional flags like:
--force to force overwrite
--amend to amend git-mob to the hook scripts
--prepend to prepend git-mob to the hook scripts
Additional context
The current approach to git mob init (as far as I know) is to update the prepare-commit-msg hook script in the local .git/ folder. I believe that currently we simply overwrite that script. This is a naive approach that assumes the mobber is not already using hook scripts in their repo.
There are other tools however (e.g. husky https://typicode.github.io/husky/) which use git hooks to kick off their workflow, so let's mature this integration and stop assuming that we "own" the hook scripts as the only actor.
This will let the git-mob integration work more smoothly with others.
Is your feature request related to a problem? Please describe.
When running
git mob initthe init command should be smart enough to respect existing hook scripts, and when uninstallinggit-mobthe hook scripts should be smart enough to avoid failing whengit-mobis not found in the PATH.Describe the solution you'd like
The first part might be addressed by adding a default failure method when the relevant hook scripts already exist, then enhancing the init command with some additional flags like:
--forceto force overwrite--amendto amend git-mob to the hook scripts--prependto prepend git-mob to the hook scriptsAdditional context
The current approach to
git mob init(as far as I know) is to update theprepare-commit-msghook script in the local.git/folder. I believe that currently we simply overwrite that script. This is a naive approach that assumes the mobber is not already using hook scripts in their repo.There are other tools however (e.g.
huskyhttps://typicode.github.io/husky/) which use git hooks to kick off their workflow, so let's mature this integration and stop assuming that we "own" the hook scripts as the only actor.This will let the
git-mobintegration work more smoothly with others.