0

This morning, I logged into my production server and accidentally delete one of my file.

UrlController.php

Unfortunately, there is no undo in WinSCP. As soon as you hit on the red X, it gone for good.

Fortunately, I use git. When I do git status, this is what I see.

enter image description here

Is there anywhere to use git to bring that file back, or undo what I just delete ?

I'm new to git. Feel free to suggest a better option. Thanks.

iori
  • 3,236
  • 12
  • 43
  • 78
  • 1
    possible duplicate of [How to undelete files in Git?](http://stackoverflow.com/questions/18564256/how-to-undelete-files-in-git) – Sascha Wolf Jan 05 '15 at 15:32

1 Answers1

2

Try this:

$ git checkout app/controllers/UrlController.php
Agis
  • 32,639
  • 3
  • 73
  • 81