混帐推失败,原因是在sourcetree沙哑预推

问题描述 投票:2回答:1

虽然推反应本地项目中,我得到的错误,由于未能沙哑预推

沙哑>推前钩失败(添加--no - 验证到旁路)

所有这些显示的错误是像下面的皮棉错误

unused-vars

27:48  error    Trailing spaces not allowed    
                     no-trailing-spaces

75:5   warning  Unexpected console statement   
                     no-console

92:93  error    Unexpected trailing comma   
                        comma-dangle

96:81  error    Unexpected trailing comma

如何在Mac上关闭这个功能上Sourcetree应用程序?

git react-native atlassian-sourcetree git-husky
1个回答
9
投票

终于找到了解决办法。这个问题(即使它不是一个问题!)是因为反应产生的钩子。只是删除对GIT中的钩夹限定预提交钩子,因此之后可以推。

编辑:您还可以跳过钩子,当你提供git的命令行参数-no-验证,或者使用Sourcetree的旁路commit钩子设置(在菜单中提交信息领域的右上角)


-1
投票

添加--no-验证你的承诺短期内结束。

我也是在Mac上,开始看到这些我觉得跟在卡罗的应用程序,我在我的主要项目文件夹内实例化的工作。我来到谷歌搜索在堆栈溢出由于我不知道什么赫斯基(“哈士奇”命令没有安装),所以我就开始四处找棉短绒,猜测尝试eslint。

➜  src_aminosee git:(master) ✗ eslint .
Error: Cannot find module '@ljharb/eslint-config'
Referenced from: /Users/tom/Dropbox/Sites/funk.co.nz/aminosee/carlojet/node_modules/array-includes/.eslintrc

这是当我意识到,我有一个混帐回购混帐回购的内部在这里(“carlojet”试试文件夹里面'aminosee的主要项目)!我不得不到该文件夹​​了(应该)移动。不知道这样的嵌套式回购的问题是什么导致你的问题,但正是如此移动和尝试提交我看到后:

git commit -am "moved carlojet folder out as i think its git repo conflicted with this main one"
Can't find Husky, skipping pre-commit hook
You can reinstall it using 'npm install husky --save-dev' or delete this hook
Can't find Husky, skipping prepare-commit-msg hook
You can reinstall it using 'npm install husky --save-dev' or delete this hook
Can't find Husky, skipping commit-msg hook
You can reinstall it using 'npm install husky --save-dev' or delete this hook
Can't find Husky, skipping post-commit hook
You can reinstall it using 'npm install husky --save-dev' or delete this hook

我的git的知识缺乏,但对我来说,就好像这些文件现在挥手“再见”不舍的回购;或者更可能的“闪烁”我有走过了到他们的父母aminosee / git的/钩/目录下(这是一个意外的惊喜!),从他们真正的家在aminosee / carlojet / git的/钩/

我可能需要禁用所有这些钩子从其他项目复制...或者更好的是弹出该棉短绒!我想不是好主意巢git仓库内本身在我的情况。

© www.soinside.com 2019 - 2024. All rights reserved.