<p>You can add <code>/media</code> to .gitignore</p>

CC BY-SA 3.0
2017-10-16T17:53:24.777Z
2017-10-16T17:53:24.777Z
oryades
<p>Git doesn't consider the untracked files for making decisions about accepting or rejecting a <code>git pull</code> operation, so you should have no worry about it.</p>

<p>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.</p>

CC BY-SA 3.0
2017-10-16T22:28:01.953Z
2017-10-16T22:28:01.953Z
Dan Cornilescu
<p>I have a dev site on a server which is synced with my git repo. The git repo does not track the media/ folder.</p>

<p>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.</p>

<p>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.</p>

<p>What's the best practice to handle this?</p>

CC BY-SA 3.0
2017-10-16T19:28:12.627Z
If the media folder does not reside in the git repository one cannot git pull it as well
030
<git>
How to handle updating binary files on a dev server with git
karatecode
# How to handle updating binary files on a dev server with git

(Asked by: username_0 on 2017-10-16)

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?

**Tags:** git

> **Comments:**
> **username_1**: If the media folder does not reside in the git repository one cannot git pull it as well  

---

## 2 answers

### Answer by username_3 on 2017-10-16. Score: 4 | Accepted answer

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.


---

### Answer by username_2 on 2017-10-16. Score: 2

You can add `/media` to .gitignore


---

