reverse-merger
v1.0.4
Published
Check whether a reverse merge occurs
Downloads
3
Maintainers
Readme
reverse-merger
Git hooks check whether a reverse merge occurs!
stop-merge为需要检测反向合并的分支,斜杠可扩展多个分支
使用gitHooks 需要安装yorkie
如果使用 husky请根据具体配置进行配置
{ "gitHooks": { "pre-commit": "node ./node_modules/reverse-merger --stop-merge=dev/test/pre", "pre-push": "node ./node_modules/reverse-merger --stop-merge=dev/test/pre", } }
建议在pre-push之前进行进行检测,如果需要也可在pre-commit 进行检测
出现反向合并后处理
.git/logs/HEAD 删除掉 Merge branch 'test' 的记录即可重新提交