Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get "fatal: git status --porcelain failed"?

Tags:

git

versioning

This is a huge pain in the bum. I've got this a few times before and I don't understand why. 5 mins ago the repo was fine and working, I move some files around (which is all cool and all) and git poops its pants. Any idea why this happens? How can I fix it apart from cloning the repo, moving the files, etc...

like image 656
Ahmed Nuaman Avatar asked Mar 28 '11 08:03

Ahmed Nuaman


People also ask

What is git status porcelain?

Porcelain Format Version 1 Version 1 porcelain format is similar to the short format, but is guaranteed not to change in a backwards-incompatible way between Git versions or based on user configuration. This makes it ideal for parsing by scripts.


2 Answers

Oh dear I'm such a fail. It looks like the problem stems from Flash Builder copying over other .git repos into sub folders. The answer is to remove all .git folders that aren't the repo's one.

like image 110
Ahmed Nuaman Avatar answered Oct 18 '22 14:10

Ahmed Nuaman


I ran into this error because of a corrupted/not properly initialized submodule (with its own .git subfolder). I temporarily deleted the submodules folder and used git init in the main project's root. Fixed the problem for me.

like image 30
Michael Thiel Avatar answered Oct 18 '22 14:10

Michael Thiel