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?
The git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git. Status output does not show you any information regarding the committed project history.
To check the status, open the git bash, and run the status command on your desired directory.
These changes mean that metadata about your file changed, however the content of your file did not. If you're working in a group, this may start to intefere with pushes or just add noise to your commits.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With