title: How to not commit deleted files with GitPython?
body: <p>I am trying to add, commit and push my folder under my local project directory to my Git Repository branch using GitPython. In time, I intend to automate this process on regular intervals, hence I have added a time stamp commit message.</p>
  <p>While my Python script below is able to accomplish what I wish to do, I have noticed that in addition to my objective, I am also adding, committing and pushing deleted files under the project directory to my repository branch.</p>
  <pre><code>from git import Repo, index
  import os
  import time
  
  
  def gitExportFolder(exportFolder='ExportFiles'):
      repos = Repo()
      repoIndex = repos.index
      path = os.path.join(repos.working_tree_dir, exportFolder)
      print(path)
      repoIndex.add(path)
      repoIndex.commit('Export #TimeStamp ' + str(int(time.time())))
      repos.git.push('origin', 'vghosh')         # vghosh is the branch name to which I am trying to push
  
  
  if __name__ == '__main__':
      gitExportFolder()
  </code></pre>
  <p>I am new to using GitPython for what I have set up to do and I am not sure what I am doing wrong. I look forward to your suggestions and alternate solutions.</p>
  <p>Thanks in advance.</p>