How can I undo adding a new file to git?
<p>I did <code>git status</code> and saw a bunch of new files, e.g.:</p>

<p>Changes to be committed:
      (use "git reset HEAD ..." to unstage)</p>

<pre><code>    new file:   project/swiftFile1.swift
    new file:   projec/swiftFile2.swift

Changes not staged for commit:
  (use "git add &lt;file&gt;..." to update what will be committed)
  (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)

    modified:   project.xcodeproj/project.pbxproj
    modified:   project.xcworkspace/xcuserdata/M.xcuserdatad/UserInterfaceState.xcuserstate

    Untracked files:
  (use "git add &lt;file&gt;..." to include in what will be committed)

    project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings
</code></pre>

<p>I did <code>git add -A</code> and it added to git all the files above, now I see there:</p>

<pre><code>Changes to be committed:
  (use "git reset HEAD &lt;file&gt;..." to unstage)

    modified:   project.xcodeproj/project.pbxproj
    modified:   project.xcworkspace/xcuserdata/M.xcuserdatad/UserInterfaceState.xcuserstate
    new file:   project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings
    modified:   project/Base.lproj/Main.storyboard
    modified:   project/swiftFile1.swift
    modified:   project/swiftFile2.swift
</code></pre>

<p>And then I realized I don't want to <code>push</code> to the repo this file:</p>

<pre><code>project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings
</code></pre>

<p>so before I do <code>git push</code> what could I do to stop committing this particular file (but not remove it from my hard drive)?</p>