I am in a project building a web app. We use Git for version control and Gulp for task automation. I would like to temporarily ignore files to a certain folder, the build folder. We tend to commit changes to that folder at the end of the day (or at the end of a coding session).
After some research I found the following command to start ignoring changes to a file:
$ git update-index --assume-unchanged path/to/file
When I run that code to ignore the build folder I see on the terminal: Ignoring path build/
But it still shows changes not staged for that folder so that I have to run git checkout -- build/
before each commit.
What am I doing wrong?
I am using git 2.9.3 on a PC with elementary OS (Ubuntu-based distro).
" ./* "
ignores all files in that directory. Also, something like" ./somedir/* "
will ignore anything in the subdirectory /firstdir/somedir but still stage any other changes under /firstdir/. Not quite the automatic process you may be wanting, but that's how I've done it. Hope it helps somehow β Troika