使用git提交失败

afdcj2ne  于 2022-12-10  发布在  Git
关注(0)|答案(2)|浏览(194)

当我尝试从pycharm执行2个文件的简单提交时,收到错误消息

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输出如下

$ 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/
uidvcgyl

uidvcgyl1#

在警告之后应该会有实际的错误,例如(因为' pagination '不是要提交的档案)

Creation of commit message file failed

这是reported before(带有提交消息,或者git hook issue),可能是一个bug(确保升级pycharm),但同时,检查命令行中的git commit -m "pagination"是否允许您通过该特定提交。

vaqhlq81

vaqhlq812#

我通过删除.gitconfig中的[i18n] config解决了此问题

相关问题