Geekality

Geekality

Search
Skip to content
  • About Me
    • The website
    • Curriculum Vitae
    • Privacy Policy
  • Juggling
    • Balls
    • Clubs
    • Diabolo
    • Flowerstick
    • Poi
  • Programming
    • EightPuzzle (Java)
    • My journey into computing
    • Project Euler (C#)
    • UltraWorm 2.0 (C++)
    • Vanity Remover (C#)
Software Development

Git: Recovering a lost commit

December 3, 2015 Torleif 4 Comments
# List head history and find the lost commit (should be among first ones)
$ git reflog

# Switch to the correct branch (if necessary?)
$ git checkout master

# Hard reset head to the lost commit
git reset --hard 1dd3a55

Source: Recovering Lost Commits with git reflog and reset

Git

Post navigation

Previous PostComposer: Replace package with own forkNext PostPHP: Array key whitelist and blacklist

Greetings! I am Torleif Berger, and I’m a Software Engineer. I’m a Seventh-Day Adventist, an introvert, an ISFJ-T, and an HSP. Currently into forest hikes and indoor rock climbing; also dabble a bit with indoor rowing, juggling, and other fun activities, but most of my time is spent in front of a screen… c”,)

Stack Overflow

Google Twitter Facebook LinkedIn YouTube Vimeo RSS

Recent Posts

  • How to split an earlier git commit into multiple ones
  • When did my Windows 10 last boot up?
  • NVDA shortcuts I keep forgetting
  • How to increase heap size for node
  • Node: Control depth when logging objects
  • Drop in use SQL Server database
  • How to clear local NuGet cache

Categories

Archives

Creative Commons License

With a hint of Social Ineptitude

Proudly powered by WordPress