git 推送失败:gitHooks/pre-push.sh: 2: : 未找到

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

我完成了更改并尝试推送我的提交,但我在图像中遇到了此错误

enter image description here

node_modules/companyPackages/utils/gitHooks/pre-push.sh: 2: : not found usage: git diff [<options>] [<commit>] [--] [<path>...] or: git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...] or: git diff [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...] or: git diff [<options>] <commit>...<commit>] [--] [<path>...] or: git diff [<options>] <blob> <blob>] or: git diff [<options>] --no-index [--] <path> <path>] common diff options: -z output diff-raw with lines terminated with NUL. -p output patch format. -u synonym for -p. --patch-with-raw output both a patch and the diff-raw format. --stat show diffstat instead of patch. --numstat show numeric diffstat instead of patch. --patch-with-stat output a patch and prepend its diffstat. --name-only show only names of changed files. --name-status show names and status of changed files. --full-index show full object name on index lines. --abbrev=<n> abbreviate object names in diff-tree header and diff-raw. -R swap input file pairs. -B detect complete rewrites. -M detect renames. -C detect copies. --find-copies-harder try unchanged files as candidate for copy detection. -l<n> limit rename attempts up to <n> paths. -O<file> reorder diffs according to the <file>. -S<string> find filepair whose only one side contains the string. --pickaxe-all show all files diff when -S is used and hit is found. -a --text treat all files as text.

这是我尝试推送我的提交时遇到的错误(我的项目是reactjs、vite、typescript)

问题:我不知道为什么会出现此错误,我遇到了这个问题并解决了它,但现在我不记得是怎么解决的

reactjs git ubuntu vite githooks
1个回答
0
投票

this worked for me just untik that git hook :) but i know there must be the better way to solve this problem

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