Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commit failed using git

Tags:

git

pycharm

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/
like image 695
Niklas Rosencrantz Avatar asked Apr 16 '26 20:04

Niklas Rosencrantz


1 Answers

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.

like image 164
VonC Avatar answered Apr 19 '26 11:04

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!