Git keeps pushing a folder despite it being in .gitignore

Howdy!

Trying to figure out git and found something strange.

I have a windows development box pushing to a server, and a hook (via post-receive) on the server to move the files to the correct folders. The problem is, no matter what I do, it always push the contents of a folder(/resources/views/Includes) with whats on the development box(These are generated pages). I tried putting this folder in .gitignore, but it doesnt matter.

Even if I make a small change to a file outside that folder and push, that folder is overwritten, ownership and permissions changed. Please help!

The  .gitignore file only applies to  untracked files. From your story I understand the file in question is indeed tracked  by Git. Knowing that - does https://stackoverflow.com/a/7927283 help?

1 Like