Answers: <p>You can add <code>/media</code> to .gitignore</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-10-16T17:53:24.777Z
Answers: 2017-10-16T17:53:24.777Z
Answers: oryades
Answers: <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>
  
Answers: CC BY-SA 3.0
Answers: 2017-10-16T22:28:01.953Z
Answers: 2017-10-16T22:28:01.953Z
Answers: Dan Cornilescu
Body: <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>
  
Comments: CC BY-SA 3.0
Comments: 2017-10-16T19:28:12.627Z
Comments: If the media folder does not reside in the git repository one cannot git pull it as well
Comments: 030
Tags: <git>
Title: How to handle updating binary files on a dev server with git
UserDisplayName: karatecode
ThreadText: # 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
  
  
  ---
  
  