2

I am doing a complex PHP project with two other people. We had git setup for the project from the beginning. After working for two months, we wanted to remove certain folders (/dev/app) from git tracking ( git was already tracking them). So I deleted all the files from /dev/app and added a entry in the .gitignore file to exclude the PHP files in the /dev/app folder.

**/dev/app/*.php

I made a commit to the master branch. I pushed them to the origin and it was working fine. But my colleagues were working on different branches. When I merged their branches with the master, git started to track the excluded files again.

In the local environment it is not a problem, but in the production environment it is a huge headache. I only need the client generated files in the /dev/app folder in the production server, and I need to preserve them without any modification.

can anyone help me to overcome the issue?

gariepy
  • 3,576
  • 6
  • 21
  • 34
Fawzan
  • 4,738
  • 8
  • 41
  • 85
  • Similar to https://stackoverflow.com/questions/7098586/git-pull-deleted-files – k0pernikus Mar 05 '16 at 01:06
  • 1
    It is somewhat similar, but I am hoping to find out a way so that no one will be able to `push` those files in the first place. – Fawzan Mar 05 '16 at 01:09

1 Answers1

-1

You should add these files to .gitignore

weras
  • 11
  • 4