title: How do I import a third party lib into git?
body: <p>I'm looking at how to import some third part code into a git repository.
  The third party code is the "stm32f10x_stdperiph_lib" that is provided by ST. </p>
  
  <p>The lib is actually a bunch of normal c-files (and header-files) that you just include and build with when you do a <a href="http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&amp;doctype=FIRMWARE&amp;ClassID=1734" rel="nofollow noreferrer">STM32</a> project.</p>
  
  <p>The problem is that they only provide it as a zip-file and 
  they do release new versions, so I would like to add more control.</p>
  
  <p>So my plan is to write a little script that does this:</p>
  
  <ol>
  <li>unzip </li>
  <li>grab some of the files (I don't need all the files in the zip)</li>
  <li>import the selected files into a git repository</li>
  </ol>
  
  <p>My problems start at the last step, how do I import and overwrite the old files with the new ones (and remove files that are no longer included)?</p>