How do I get back a file I deleted?

If it was committed, it is in the history. If it was not, it may be in Recovery.

It had been committed

Then it is not gone. A deleted tracked file shows in the working copy as Removed, and discarding that change brings it back from your last commit.

If the deletion was itself committed, find the commit before it in the history, open the file’s diff there, and the contents are in front of you.

It had never been committed

Then Git never had a copy, and where it is depends on how it went:

  • Discarded in InnestaRecovery has it for seven days, or for as long as you have told it to keep backups. Discarding an untracked file deletes it, and Innesta backs it up first for exactly this reason.
  • Deleted in Finder or a terminal — Innesta never saw it. Try the Trash, or your Mac’s own backups.