Skip to content

Instantly share code, notes, and snippets.

@marcelosantos
Last active June 14, 2017 15:44
Show Gist options
  • Save marcelosantos/2f985384de48ab93f766899480579155 to your computer and use it in GitHub Desktop.
Save marcelosantos/2f985384de48ab93f766899480579155 to your computer and use it in GitHub Desktop.
Removing a specific file from a commit

This is a git command to remove an specific file from a commit

$ git checkout HEAD~ path/to/file

$ git commit --amend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment