0

I copied a repository (which had some not committed changes)

   $ git checkout -b feature/servicing/pal4_Migration2
   M       .idea/libraries/tsconfig_roots.xml
   M       ui/dev/pages/AbstractChecks.ts
   M       ui/dev/pages/availabilities/avac/AvacChecks.ts

In this new repository I added my changes and when I try to commit I get the following error:

 $ git commit -n
 ERROR: fatal: failed to stat 
'HEAD^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^': Filename too long ERROR: GIT::Command::git_or_die died at line 164

I am not a big expert in git so do not hesitate to ask for more information if you think you know what is going on. Do you know a way to solve this?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
David
  • 67
  • 6
  • Welcome to Stack Overflow. You filled out a box which prompted you to "Ask a question". Questions in English are denoted by a question mark, ?, and can receive an answer, the second part of a *Question and Answer* site. Please [edit] the post to contain an actual question. – Adriaan Apr 17 '18 at 07:18
  • 1
    Do you really have the file "HEAD^...." somewhere? – max630 Apr 17 '18 at 07:26
  • Which software do you use? The error message does not look like the real git's. It look like some perl script failure – max630 Apr 17 '18 at 07:31
  • The file HEAD^^ is not in any of the GIT subfolders. And the git version 2.16.2.windows.1 – David Apr 17 '18 at 08:51
  • The 'perl like' look is probably due to that GIT on Windows is PERL dependent – David Apr 17 '18 at 09:00
  • 1
    There's no perl that runs as part of the commit process. Can you show us your pre-commit hooks? – Edward Thomson Apr 17 '18 at 11:22

1 Answers1

1

I needed to use "-n" option to skip the TSLint. I tried to do the commit adding the commit message "-m":

    $git commit -n -m "Fix_test5"

I did not have the problem usign this command. It looks like if you want to ignore the checks you must leave a comment

David
  • 67
  • 6