Stefan Beller <sbeller@xxxxxxxxxx> writes: > Yes, there is also one lonely shell script in there, which also needs > exclusion. Thanks for catching them. > +* > +!.sh > +!.[ch] I'd use this instead, though. -- >8 -- * !*.sh !*.[ch] !*.gitignore -- 8< -- In a dirty repository full of crufts but without any local modifications, if you do $ git rm --cached -r t/helper $ git add t/helper you should be able to make your index identical to HEAD. The version that was posted did not resurrect .gitignore and none of the source files, but the replaced one should.