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?

1
  • If the media folder does not reside in the git repository one cannot git pull it as well
    – 030
    Oct 16, 2017 at 19:28

2 Answers 2

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.

2

You can add /media to .gitignore

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.