For my own memory more than anything else:

  1. git rebase -i <the last commit before the file appeared>
  2. edit those commits where the file appears with other files (Highlight using gitk), then for each of those:
    1. git reset HEAD^
    2. Create one commit for the file, and another for the rest.
    3. git rebase --continue

Source: Splitting commits