Содержание
- pre-commit hook failed (add —no-verify to bypass) #716
- Comments
- Русские Блоги
- Резюме встречаемого SVN (непрерывное обновление)
- Commit failed with error KEY_TF_BAD_EXIT_CODE #44
- Comments
- BoGnY / README.md
pre-commit hook failed (add —no-verify to bypass) #716
I’m getting the following error:
This is my package.json
I tried everything that is mentioned here but nothing works.
I have the latest vesion of everything:
intellij IDEA 2020.1, node 13.13.0, npm 6,14,4, git 2.24.0.windows.2, husky 4.2.5
The text was updated successfully, but these errors were encountered:
@typicode it seems like reverting back to using run-node might be a good idea.
Have a similiar problem, with additionall data:
no, not using nvm 🙂 every dev is on the latest node anyway
Same situation as @Thorbenl cept mine is barking about prettier and we are not using husky in this repo. Probably not be specific to husky ultimately.
prettier requires at least version 10.13.0 of Node, please upgrade
Same on Windows:
Why is it using node v11, when I have another node version installed?
same here, with husky 4.2.5,eslint 7.0.0, prettier 2.0.5,pre-commit doesn’t work.
I had the same problem on babun console with
git version 2.21.0
node v12.13.0,
«husky»: «^4.2.5»,
«lint-staged»: «^10.2.2»
Downgrading «lint-staged» to version 8.1.7 fixed the issue.
I ran into the same issue. I copied «husky»: «^4.2.5» from devDependencies and added to dependencies. Ran npm i again and all was well.
Hey @cjoecker, I believe this issue is because of the fact that git has its own pre-hooks , and now, with husky, you have added yours. I think there is a conflict between those two.
For a temporary solution, you can just delete the hook folder from ./git folder from your project or maybe move it out of your project folder(if you want). This worked for me. Hope so for you too.
Facing same issue for pre-commit hook failed with below husky
«husky»: <
«hooks»: <
«pre-commit»: «lint-staged && npm run precommit»
>
>,
Not compitable with node 10. tried with node 12.18.3 .worked great
Finally found a solution. The issue (even though it’s not an issue! ) is because of the hooks created by react. I simply deleted the hooks folder for git which defines the pre-commit hooks and hence can push after that.
Edit: You can also skip hooks when you provide the git command line argument —no-verify, git push origin master —no-verify, or use Sourcetree‘s Bypass commit hooks setting (in the menu to the top right of the commit message field)
Finally found a solution. The issue (even though it’s not an issue! ) is because of the hooks created by react. I simply deleted the hooks folder for git which defines the pre-commit hooks and hence can push after that.
This worked for me. Thanks @AnandB23, you saved me from wasting more hours on this
Finally found a solution. The issue (even though it’s not an issue! ) is because of the hooks created by react. I simply deleted the hooks folder for git which defines the pre-commit hooks and hence can push after that.
Edit: You can also skip hooks when you provide the git command line argument —no-verify, git push origin master —no-verify, or use Sourcetree‘s Bypass commit hooks setting (in the menu to the top right of the commit message field)
Not really a solution if you want the hooks to run. If you just delete the folder then it just stops working. I am having the same issue. Only happens on my Windows machine and I still haven’t found a solution.
When I try to make a commit I get this:
. >git commit -m «test»
On Mac and Linux this issue does not seem to happen. I tired uninstalling nodejs and installing the latest version, but it did not help.
Managed to make it work by changing
However now I am just bypassing lint-staged, but what if I want that to work too?
Источник
Русские Блоги
Резюме встречаемого SVN (непрерывное обновление)
svn:E200009: “xxxx.xx.java” is not under version control
Причина: локальный рабочий каталог не находится в версии SVN контроля версий, или локальное удаление удалено, но управление версией также считается причиной этого.
Решение: Первая команда — чистота, в папке файла ошибок оформления оформления оформления кафедры, то если вам нужно его отправить, то выполнить COMMOTION.
Игнорировать сбой правил файлов
Во время процесса игнорирования файлов загрузите и обновите, игнорируйте отказ правил файла во время загрузки и обновления.
Решение 1: в каталоге, где находится проект, загружайте файлы / обновления вручную.
Решение 2: После добавления файла игнорирует режим работы, нажмите кнопку синхронизации
svn: E155011: Commit failed (details follow)
SVN устарело, что другие представили файл, прежде чем вы уже представили в репозитории SVN, вам нужно обновить, после слияния.
SVN Update Error: Please execute the ‘Cleanup’ command
Некоторые файлы обновляются или загружаются, что заблокировано.
Когда обновление или загрузка не завершена, в локальном уровне нет выпуска в локальном состоянии.
Решение: Нажмите на правую кнопку -> очистить.
Если вышеуказанное решение не является, соответствующий файл удаляется в .svn of the .svn. Svn.
partial commit of active changelist
После отправки кода: частичный фиксатор активного всплывающего конфлиста
Нажмите Да -> Всплесс Переместить на другой Changelist-> Commit
В всплывающем окне управления версией -> Найдите Failed Commit Commit: кнопка «Графа по умолчанию» -> «Различать».
Error:svn:E1550000:Node remains in conflict
SVN решен: удаляет «конфликт» состояние каталога или файла копии работы.
К ошибке ошибки, щелкните правой кнопкой мыши -> «SVN» -> «Решина» -> «Всю путь».
После выполнения вышеуказанных шагов, повторное обновление операции, состояние успеха выглядит следующим образом:
Источник
Commit failed with error KEY_TF_BAD_EXIT_CODE #44
Hi!
In IntelliJ I installed everything as it’s said there http://java.visualstudio.com/docs/tools/intelliJ#_tfvc-support-preview
When I try to check in changes to my TFVC repository, I’m getting this error:
“Commit failed with error
0 files committed, 1 file failed to commit:
KEY_TF_BAD_EXIT_CODE”
Besides, «TFVC (preview)» is disabled in VCS menu.
Best regards,
Kate
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue and providing the logs. We have a fix for the TFVC menu being disabled along with a few other fixes. Those should be going out soon. If we can determine what caused your error here, we will get a fix ready for that problem as well.
Thanks for trying it out and helping us improve the product.
Jason
@jpricketMSFT Hi, Jason.
I updated the plugin to 1.109.0. Now I can add nothing to source control. I change classes, add new items. «Add» is disabled and there are not my changes in Version control window tool.
In logs I can see only warnings:
Maybe I do something wrong?
Also, does your plugin support Gated Check-in?
@bubblef — It looks like you are getting an error from the status command when it tries to parse the output from the command line. Did you change the command line client in any way? It could be a bug, but I am not seeing that error here. The log file should show the command line used to call status as well. Can you try running that command line directly and see what response you get?
No Gated Check-in support right now. Sorry.
Hi Jason,
Sorry for the delay.
No, I didn’t change the command line client.
I create a new class (IDEA highlights it with a blue color). I run a command to get a status and I get only this:
(the same is in the log file)
So, there are no changes for VCS.
It is reproduced on Mac OS. I updated IDEA to 2016.3.
Hi Kate,
Can you confirm if your workspace is a Server or Local workspace? We don’t fully support Server workspaces yet. For Local workspaces, the status call should detect the new file and return it as a possible add.
Thanks,
Jason
Hi, Jason!
I updated the plugin to 1.111.0 and I do not have any issues. It works well so far 😺
This is awesome! Thanks for letting us know.
Hi, is gated check-in supported yet?
Hello,
This morning when I tried to commit changes I got that same error, and received an update for the plugin after the updates I receive this error:
`— JAVA_EXCEPTION — javax.ws.rs.NotAuthorizedException: HTTP 401 Unauthorized at com.microsoft.alm.plugin.idea.tfvc.core.TFSVcs.getServerContext(TFSVcs.java:275) at com.microsoft.alm.plugin.idea.tfvc.core.TFSFileListener$1.run(TFSFileListener.java:78) at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:267) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726) at com.intellij.openapi.progress.impl.CoreProgressManager$6.run(CoreProgressManager.java:410) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:176) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:556) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$9(ApplicationImpl.java:594) at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
I temporally found a fix for this.
I simply, switched server from manage workspace from TFVC menu , reconnect to the same server , chosen same workspace, got an error message «I can’t choose the same exisitng workspace» , clicked ok, tried to checkin file, committed file successfully.
Also I found out that it’s a problem with the TFS plugin doesn’t store my credentials, every time I close rider.
when I did the temporarily fix I found my credentials in place. but if I rested the application, it will loose them.
any help with that ?
We currently still don’t have checkin policies in place but they are high on our priority list to get to next. Sorry for the inconvenience!
Thanks for reporting the issue. I am aware of the credentials not being saved on the IDE restarting. I’m currently looking into that. Other than that, is everything else working for you? The NotAuthorizedException was because your credentials couldn’t be found so it was correct of you reload the workspace using the Manage Workspaces dialog. That allows you to re-enter your credentials when they can’t be found. They should be saved though and like I said I’m working on that fix.
Thanks guys, you rock, waiting the updates.
Everything else is working just fine :), so far. been using the IDE for a week.
The same problem was reported with issue #95. I just attached a newer version of the plugin there with a fix to test out for the password problem. Could you please test it if you have a chance and let me know if it works for you.
Источник
BoGnY / README.md
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don’t support it natively
This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don’t support it natively (eg. GitHub Desktop, Eclipse, Git Tower, . )
- Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
- Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell(Make sure your local version of Git is at least 2.0, otherwise Git don’t have support for automatically sign your commits)
- Verify if Git was successfully installed with:
Remember that Git for Windows install old 1.4.xx version of GnuPG (provided through MINGW environment), but this is irrelevant, as we are going to manually specify which GnuPG program our Git must be using (which is the GnuPG version installed by GPG4Win)!
- Install your favorite IDE with Git support, like:
- GitHub Desktop: https://desktop.github.com/
- Eclipse: https://www.eclipse.org/downloads/ with one of Git plugin (mandatory)
- Generate your GPG keys: visit https://help.github.com/articles/generating-a-new-gpg-key/ for a completed and detailed instructions, or otherwise use Kleopatra manager (Notes: key size should be at least 2048 bits, but 4096 is better; key should probably not expire; and you can append multiple email addresses to your GPG key)
- Verify installation of your key:
Simple press «Commit» button on your favorite IDE, you see a simple window that ask your key password!
Remember that GPG4Win install also a GPG agent, that remember your password for a limited times (I think 30 minutes) by default, so you don’t have to enter your password every time!! (IMHO there is a setting for change it, but I haven’t search it yet).
thanks works for me in vs code n github desktop without last optional step
Followed instructions perfectly. Doesn’t work for me on a fresh Windows 10 Pro install using Github Desktop. Errors with:
The only thing I can think of is that I only installed GnuPG from GPG4Win because I thought it was the only part that was relevant.
I figured out my issue. I was using Git Bash instead of cmd.exe or PowerShell. This was using a different gpg which was putting the GPG keys in a location that /c/Program Files (x86)/GnuPG/bin/gpg.exe didn’t know about. All I had to do was change
$ git config —global gpg.program «/c/Program Files (x86)/GnuPG/bin/gpg.exe»
$ git config —global gpg.program «/c/Program Files/Git/usr/bin/gpg.exe»
and everything worked. I’ve uninstalled GPG4Win as it seems that it wasn’t actually needed.
My version of git is now 2.19.0.windows.1 , and gpg is 2.2.9-unknown
Thanks! I needed the line
though I had to change it to:
maybe because I was using PowerShell rather than Git Bash.
Note that git now comes with gpg2, which can make things easier.
PS I have written down some steps in which some of the issues mentioned are addressed, see here
it worked! thanks. the official document didnt work so well
Both Git and GPG are in the PATH system variable, so I used PowerShell on Windows 10 to set this up. Worked like a charm. Thanks!
git config —global gpg.program «/c/Program Files/Git/usr/bin/gpg.exe»
I figured out my issue. I was using Git Bash instead of cmd.exe or PowerShell. This was using a different gpg which was putting the GPG keys in a location that /c/Program Files (x86)/GnuPG/bin/gpg.exe didn’t know about. All I had to do was change
$ git config —global gpg.program «/c/Program Files (x86)/GnuPG/bin/gpg.exe»
$ git config —global gpg.program «/c/Program Files/Git/usr/bin/gpg.exe»
and everything worked. I’ve uninstalled GPG4Win as it seems that it wasn’t actually needed.
My version of git is now 2.19.0.windows.1 , and gpg is 2.2.9-unknown
I figured out my issue. I was using Git Bash instead of cmd.exe or PowerShell. This was using a different gpg which was putting the GPG keys in a location that /c/Program Files (x86)/GnuPG/bin/gpg.exe didn’t know about. All I had to do was change
$ git config —global gpg.program «/c/Program Files (x86)/GnuPG/bin/gpg.exe»
$ git config —global gpg.program «/c/Program Files/Git/usr/bin/gpg.exe»
and everything worked. I’ve uninstalled GPG4Win as it seems that it wasn’t actually needed.
My version of git is now 2.19.0.windows.1 , and gpg is 2.2.9-unknown
Yep, this was also my problem. If you manually install GPG command line tools, you end up having two gpg.exe inside git-bash.exe . This can be verified by typing where gpg inside Git Bash. Cheers, mate!
I figured out my issue. I was using Git Bash instead of cmd.exe or PowerShell. This was using a different gpg which was putting the GPG keys in a location that /c/Program Files (x86)/GnuPG/bin/gpg.exe didn’t know about. All I had to do was change
$ git config —global gpg.program «/c/Program Files (x86)/GnuPG/bin/gpg.exe»
to
$ git config —global gpg.program «/c/Program Files/Git/usr/bin/gpg.exe»
and everything worked. I’ve uninstalled GPG4Win as it seems that it wasn’t actually needed.
My version of git is now 2.19.0.windows.1 , and gpg is 2.2.9-unknownYep, this was also my problem. If you manually install GPG command line tools, you end up having two gpg.exe inside git-bash.exe . This can be verified by typing where gpg inside Git Bash. Cheers, mate!
THISS x 1000000 .
THANK YOU. — Windows 10 , Followed GitHub Instuctions, Got Wrecked before this helpfull post. Thanks!!
Thanks Bro, Success On My Windows 10 Home.
My Config for error ‘cannot spawn gpg2 : No such file or directory’ :or we can store this config to «environtment system variables» and use this config :
It worked. Thank you!
Thank you so much. It worked perfectly.
The installation of GPG4Win installed 3 different components to my PC. I would like to know which ones are important and which ones are not. I have Kleopatra, GPA and Gnu Privacy Guard.
git config —global gpg.program «/c/Program Files/Git/usr/bin/gpg.exe»
Thanks @davidmurdoch man when I chanded the path like this it worked for me!
I just had to uninstall the second GPG key install and update and use the Git embedded version to work in Git Bash and SourceTree Windows
Uninstalled GnuPG:
C:/Program Files (x86)/GnuPG/bin/gpg.exe»Running this command:
where gpgI just had to uninstall the second GPG key install and update and use the Git embedded version to work in Git Bash and SourceTree Windows
Actually, if you use a native command shell (or PowerShell), you don’t need to use embedded GnuPG, as well as Git Bash
When I am trying to generate a new key I am the following error
gpg: Sorry, no terminal at all requested — can’t get input
can anyone help me out to solve this issueIm trying to make it work on Pycharm, however it still displays the same error message.
Commit failed with error
0 file committed, 1 file failed to commit: Block D Factories created, pending implementation — TESTE
gpg: skipped «USERNAME «: No secret key
gpg: signing failed: No secret key
gpg failed to sign the data
failed to write commit objectThis is my local .gitconfig file. Anyone with the same issue?
everything worked fine until you had to tell git here the exe was for gpg. The command I used instead was:
git config —global gpg.program «C:Program Files (x86)GnuPGbingpg.exe»thank you full , i am worked git config —global gpg.program «C:Program FilesGnuPGbingpg.exe»
everything worked fine until you had to tell git here the exe was for gpg. The command I used instead was:
git config —global gpg.program «C:Program Files (x86)GnuPGbingpg.exe»This was my issue as well. Got it working, thanks!
if still getting gpg failed to sign the data fatal: failed to write commit object
this is not issue with git ,this is with GPG follow below steps
echo «test» | gpg —clearsign
if it is showing:
then use export GPG_TTY=$(tty)
then try again echo «test» | gpg —clearsign in which PGP signature is.
- git config -l | grep gpg
- apply git commit -S -m «initial commit 🚀 🚀 🚀 🚀 «
- or git config —global commit.gpgsign true
Thank so much!
I changed
git config —global gpg.program «/c/Program Files (x86)/GnuPG/bin/gpg.exe»
to
git config —global gpg.program «C:Program Files (x86)GnuPGbingpg.exe»Thank so much!
I changed
git config —global gpg.program «/c/Program Files (x86)/GnuPG/bin/gpg.exe»
to
git config —global gpg.program «C:Program Files (x86)GnuPGbingpg.exe»same.
Setting this config entry also was mandatory. I wasn’t sure what issued the «git gpg skipped . no secret key» error message, but now I know it was this line.Thank you ! It worked for me.
If it will be answered there, then it’ll help those who still can’t get this to work from Eclipse.
When another GPG instance (same major version, though!) uses a different directory for the databases, you can always point them to the correct one using the GNUPGHOME environment variable.
Another way is to create a junction point or symbolic link from %USERPROFILE%.gnupg to %USERPROFILE%.gnupg , that is either (after moving the old %USERPROFILE%.gnupg out of the way):
or (this requires to be run in an elevated prompt, unless the option to create symbolic links was enabled for the current user, e.g. via the Git for Windows installer):
From experience the respective files can live side by side peacefully. I have not heard of another location used by GnuPG flavors on Windows. But if they exist, you can always point them all to the same directory. However, keep in mind that 1.x and 2.x versions use different databases altogether, so this still doesn’t iron out all issues.
Источник
I get the error msg when trying to do a simple commit of 2 files from pycharm
06:11 Commit failed with error
0 files committed, 1 file failed to commit: pagination
warning: CRLF will be replaced by LF in static/images/kb-icon-arrow-1.svg.
The file will have its original line endings in your working directory.
git status outputs the following
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: static/images/kb-icon-arrow-1.svg
modified: static/images/kb-icon-arrow-2.svg
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: app.yaml
modified: pytz/__init__.pyc
modified: pytz/exceptions.pyc
modified: pytz/tzfile.pyc
modified: pytz/tzinfo.pyc
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/
asked Mar 25, 2017 at 5:19
There should be an actual error after the warning, like (since ‘pagination
‘ is not a file being committed)
Creation of commit message file failed
That was reported before (with a commit message, or a git hook issue), and could be a bug (make sure to upgrade pycharm), but in the meantime, check if a git commit -m "pagination"
in command line allows you to get past that particular commit.
answered Mar 25, 2017 at 5:54
VonCVonC
1.2m508 gold badges4248 silver badges5069 bronze badges
I resolved this problem by removing [i18n] config in .gitconfig
answered Jun 15, 2018 at 9:59
Причина возникновения этой ошибки указана в этом сообщении: https://stackoverflow.com/a/29485441/2769415
Файловая система Windows в основном нечувствительна к регистру, поэтому вы не можете переименовать файл, просто изменив его регистр. Вместо этого вам придется использовать временное имя между ними.
Решение: переименуйте файл обратно в исходный, затем переименуйте его в другое имя, а затем вернитесь к файлу с правильными заглавными буквами. Git больше не выдаст ошибку.
Пример:
Created FOOBar class.
Renamed it to FooBar and then got the error.
Rename it back to FOOBar.
Rename to FooBarTest.
Rename to FooBar.
Git works now.
Это ошибка, которую вы получаете при попытке запустить
git commit <file>
но <file>
еще не поставлен; Другими словами, Git еще не сказал об этом. Скорее всего, это то, что здесь происходит. Запустить
git add application/libraries/Funder.php
затем попробуйте совершить.
У меня была такая же проблема в Android Studio после переименования некоторых действий. Я пробовал добавлять (git add) и перемещать (git mv) файлы, но это не помогло, и я снова и снова получал одно и то же сообщение.
Наконец, я решил сделать резервную копию классов в пакете, в котором был проблемный файл, в отдельной папке на моем жестком диске, затем я удалил файлы из исходной папки и в терминале сделал:
rm app/src/main/java/com/path/to/package/with/problematic/files/
Затем воссоздал удаленный пакет через Android Studio, скопировал и вставил туда мои классы. После этого я смог совершить фиксацию без каких-либо проблем.
Вот краткий ответ о самом быстром способе решения этой проблемы. Подобно сообщению @ cmbind55, но по существу.
Проблема: я добавил файл, который позже переименовал.
Решение:
- Отменить добавление старого имени файла
git reset HEAD oldFileName.file
- Теперь добавьте новое имя файла
git add newFileName.file
- Примите участие и будьте счастливы
У меня был этот сценарий неудачной фиксации из-за переименованного каталога.
Это был изначально созданный каталог с ошибкой использования заглавных букв:
application/Templates/lists/index.html
В среде IDE я согласился добавить этот файл в существующий репозиторий git. При более позднем тестировании я обнаружил, что у меня проблема с путями, чувствительными к регистру, с заглавными буквами «Шаблоны». В среде IDE я просто переименовал каталог в «шаблоны» (в нижнем регистре). Я не записывал фактическую последовательность событий вокруг этого, но позже, когда моя фиксация завершилась неудачно с появлением следующего сообщения, у меня возникло подозрение, что это была эта проблема. Судя по всему, IDE не полностью справилась с этим случаем переименования каталога.
Сообщение об ошибке фиксации IDE:
Фиксация завершилась ошибкой: pathspec «application / templates / lists / index.html» не соответствует ни одному файлу (файлам), известным git.
После некоторого чтения моя стратегия заключалась в том, чтобы извлечь файл и затем снова добавить его. Я отключил подозрительный файл
git reset HEAD lists/Templates/lists/index.html
Обратите внимание, git status показывал здесь только каталог … Не файл.
Untracked files:
(use "git add <file>..." to include in what will be committed)
lists/templates/
Затем я добавил обратно с исправленным именем каталога (я использовал только путь для добавления, следуя указаниям из git status).
git add lists/templates/
После этого моя фиксация прошла успешно. Я не уверен, был ли это идеальный метод, но в моем случае он устранил ошибку фиксации.
у меня была такая же проблема. просто замените «одинарные кавычки начального комментария» на двойные кавычки «»
если вы работаете с терминала, убедитесь, что у вас есть флаг сообщения в вашей команде.
git commit "Your Commit Message" //Throws an error: pathspec '3.
git commit -m "Your Commit Message" //No error thrown
У меня была аналогичная проблема, но я ее исправил. Я должен был использовать «» вместо «» в командной строке Windows
У меня такая же проблема. Ни один из ответов здесь не помог мне решить проблему. После двухдневного застревания я обратил внимание, что все имя файла с путем очень длинное. Я провел рефакторинг, переименовав его во что-то менее сложное и переставил папки, чтобы уменьшить полную длину имени файла, и это сработало!
iOS 9.2.1, Xcode 7.2.1, ARC включен
Загляните в это, изменяя файл «contents.json» для моего каталога ресурсов LaunchImage. Вы можете использовать команды терминала, указанные в качестве ответа, но попробуйте более простой способ …
Контроль версий -> Обновить статус
Надеюсь это поможет. Ваше здоровье!
У меня был этот неудачный сценарий фиксации из-за переименованного каталога.
Это был исходный каталог с ошибкой капитализации:
application/Templates/lists/index.html
В среде IDE я согласился добавить этот файл в существующий репозиторий git.
В более позднем тестировании я обнаружил, что у меня возникла проблема с вопросом с учетом капитализации «Шаблоны». В среде IDE я просто переименовал каталог в «шаблоны» (изменен на нижний регистр). Я не записывал фактическую последовательность событий вокруг этого, но позже, когда мой коммит завершился с сообщением, у меня возникло подозрение, что это была эта проблема. По-видимому, IDE не полностью справилась с этим случаем переименования каталога.
Сообщение об ошибке фиксации IDE:
Ошибка коммита с ошибкой: pathspec «application/templates/lists/index.html» не соответствует ни одному файлу, известный как git.
После некоторого чтения моя стратегия заключалась в том, чтобы вернуть файл и снова добавить его. Я заблокировал подозрительный файл
git reset HEAD lists/Templates/lists/index.html
Примечание. git статус показывал только каталог здесь… Не файл.
Untracked files:
(use "git add <file>..." to include in what will be committed)
lists/templates/
Затем я добавил обратно исправленное имя каталога (я использовал только путь для добавления, следуя примеру git).
git add lists/templates/
После этого мое совершение преуспело. Я не уверен, что это был идеальный метод, но он разрешил ошибку фиксации в моем случае.