S
S
Sergey Gladyshev2017-06-07 13:25:01
git
Sergey Gladyshev, 2017-06-07 13:25:01

Git. Why is trying to commit a file from a folder that is in gitignore?

Good day.
The file prntscr.com/fgwyj0 stubbornly climbs into the commit .
Although the whole .idea folder is added to .gitignore prntscr.com/fgwzj0 .
What is the reason for this strange behaviour?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2017-06-07
@Resident234

First, it would be much easier for everyone to provide the text of the .gitignore file, rather than some screenshot on a site with a ton of banners that takes two minutes to load. It's just a text file. Secondly, in the same way it was possible to give the text output of the command git statusinstead of an incomprehensible screenshot of an incomprehensible what.
You don't have the entire .idea folder added to .gitignore. And the file may have been manually added to the git index, or before the .gitignore entry was created. You can cancel this action with the commandgit reset .idea/workspace.xml

V
Victor, 2017-06-07
@v_decadence

It was probably added earlier, before being added to .gitignore.
git rm file --cached

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question