• Skip to primary navigation
  • Skip to content
  • Skip to footer
>>> import diegor just another special module
  • CV
  • Posts
    Diego Russo

    Diego Russo

    Software Engineer

    • Cambridge, UK
    • GitHub
    • LinkedIn
    • BlueSky
    • X
    • Facebook
    • Instagram
    • Email

    HOWTO: restore a deleted file in git

    less than 1 minute read

    $ git rev-list -n 1 HEAD -- path_to_file  #this gives you the commit's hash  
    $ git checkout commit_hash^ -- path_to_file # it restores the file
    

    Tags: git, job

    Categories: english, howto

    Updated: August 14, 2014

    Share on

    X Facebook LinkedIn Bluesky
    Previous Next

    Comments

    You May Also Enjoy

    Help with COVID-19 research - protein folding on Raspberry Pi4

    2 minute read

    Hello, it has been a while since I wrote here last time.

    The must-read Python’s PEPs

    6 minute read

    As Python developer, you should know what a PEP is. In case you don’t, “PEP stands for Python Enhancement Proposal. A PEP is a design document providing i...

    Goodbye Wordpress, hello Github (Jekyll)

    2 minute read

    It has been a while I’m not writing in this blog. I have my reasons but the main one is because I’ve been busy migrating the whole website from Wordpress to ...

    Having fun with micro:bit and micropython

    1 minute read

    Last night I attended the usual CamPUG monthly meeting and the main topic was about micro:bit and micropython.


    • GitHub
    • LinkedIn
    • BlueSky
    • X
    • Facebook
    • Instagram
    • Feed
    © 2025 >>> import diegor. Powered by Jekyll & Minimal Mistakes.