git status show files between ""

git, git-status

Solution

They are shown between quotes because the file name contains backslashes. In the shell, backslashes have a special meaning, so you have to either escape them or quote them.

The quotes are a convenience so you can just copy and paste git status's output, e.g., to add the file to the index:

$ git add "public/images/wallpaper/wait/1920\321\2051080.jpg"
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ copied and pasted

You can just add the filename to .gitignore without the quotes. Most probably, you'll want to add something like this to your .gitignore file:

public/images/wallpaper/wait/*.jpg

Problem

I made git status command and get this: ``` # "public/images/wallpaper/wait/1920\321\2051080.jpg" # public/style.css ``` Why some files are between quotes? And how I can add to .gitignore them?

Original source