0

I am having an issue with git CLI

background: I am running code prettier on my staged files on pre-commit git hook. but it works to format my code only if the user uses Gitkraken.

after investigation, I saw that git has different behavior from Gitkraken.

when I use Gitkraken to stage changes, I can see the diff enter image description here

but if I use git add . to stage files, there is no change to the files.

enter image description here

and I think this is the cause of the problem that prettier does not see any files to work with when using git CLI.

0 Answers0