3

I have a dev site on a server which is synced with my git repo. The git repo does not track the media/ folder.

I want to update the content on the dev server to mirror the live server, so will copy over the database and the media/ folder from live to dev.

My worry is when I do this, git will pick up the changes in the filesystem with the new media/ files and won't allow me to do a git pull.

What's the best practice to handle this?

karatecode
  • 133
  • 2
  • If the media folder does not reside in the git repository one cannot git pull it as well – 030 Oct 16 '17 at 19:28

2 Answers2

4

Git doesn't consider the untracked files for making decisions about accepting or rejecting a git pull operation, so you should have no worry about it.

If still in doubt you can easily verify it: just pull another copy of the same git repo in some other location - for test only - mess with untracked files in it and pull again.

Dan Cornilescu
  • 6,730
  • 2
  • 19
  • 44
2

You can add /media to .gitignore

oryades
  • 412
  • 2
  • 5