This is a question about why Giggle acts in a certain way.
To reproduce what my question is about you need to have git and Giggle installed. Step 4–10 is not necessary to reproduce. I added them to illustrate git workflow.
mkdir test– Make a directory for testing.
git init– Initialize a git project.
echo -e '/*\n!*.tex' > .gitignore– Create a .gitignore file.
echo -e "test" > test.tex– Write something to test.tex.
git add .
git commit -m "First commit"– Commit what's written to test.tex.
echo -e "\test" >> test.tex– Write something more to test.tex.
git add .
git commit -m "Second commit"– Commit what's written to test.tex.
- Check the project in Giggle. There is no file to be viewed in the project:
- Update the project in Giggle (Ctrl+R). Now the file can viewed:
Why can't the files be viewed when the .gitignore file is there (step 11)? It should not be due to the .gitignore file. The content of the .gitignore file is:
The first line means ignore all. The second line means don't ignore all .tex files. So test.tex should not be ignored.
man gitignore says
An optional prefix ! which negates the pattern; any matching file excluded by a previous pattern will become included again.