A
A
Architecktor1332017-09-18 19:28:45
git
Architecktor133, 2017-09-18 19:28:45

How to make git ignore files?

Help, nothing helps. There is a .gitignore file, which has only three lines:
log/*
tmp/*
profile/*
The first two patterns work, both files and folders are ignored - everything is in general. But profile / * does not want to work in any. Indexes any changes. git reset --hard does not remove files from the indexed list, that is, git has indexed .gitignore, knows what to ignore, but does not ignore. git rm -r --cached profile/ doesn't help, and neither does ignoring every single file, every single directory. Help fight this plague

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Astrohas, 2017-09-18
@Astrohas

git rm -r --cached . 
git add .
git commit -am "Remove ignored files"

A
Artur Karapetyan, 2017-09-18
@architawr

Try: /log//tmp//profile/

A
Alex Bowey, 2017-09-21
@Toha96Toha

Try writing a folder to .git/info/exclude - exclude is a file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question