How do I remove a deleted but committed file from git?

I a have a file that has been moved from its folder, git sees this file as removed, so you run:

git add -u

This adds the deleted file to your ‘Changes to be committed’, I’ve tried to use:

  • Does git ignore capitalization changes in file names?
  • Get number of files in git repository at any revision
  • Changes to main branch not appearing after merging
  • Git : How to get name of the branch tracked by the current one?
  • IDE for eBooks to use version control
  • git: remove 2nd commit
  • git rm 
    git clean -f and -n

    Has anyone come across a similar issue? Here what the git status states:

    git status
    On branch master
    Changes to be committed:
      (use "git reset HEAD <file>..." to unstage)
      deleted: path/file.txt

    I’m running Windows 8 with git bash.

  • Finding the branch where a commit originally appears (git/Jenkins/CD)
  • Difference between checkout remote branch and pull remote branch in git?
  • Gitlab 7.3.2 Permission Denied (publickey)
  • How to resolve git submodule conflict if submodule is not initialized
  • GIT Hook Doubts
  • How to escape slashes in git filter
  • 2 Solutions collect form web for “How do I remove a deleted but committed file from git?”

    to commit changes, do git commit.

    I believe you are trying to remove a file from the entire git history.

    To do so, following the answer on the following page will help:

    Remove sensitive files and their commits from Git history

    Git Baby is a git and github fan, let's start git clone.