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:

  • Total Count of Change Sets for Mercurial and Git
  • Jenkins pipeline git command submodule update
  • git: merge changes from a branch that reverted a previous merge
  • Are GIT refs always case insensitive?
  • Git: Putting local directory under revision control
  • git blame with commit details in emacs
  • 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.

  • Move .git folder up in working tree hierarchy
  • Git describe giving different tags
  • Check that git repository exists
  • How to align RoundhousE to one-time scripts that have changed due to git line-ending normalisation?
  • Gitolite Eclipse 'Auth fail'
  • git sandbox for anyone to pull/push to?
  • 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.