Restore deleted file in Git

/ Published in: Bash
Save to your folder(s)

Restore a deleted file within the git repo

Copy this code and paste it in your HTML
  1. git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.