Skip to content
Curiousish
  • How to’s
  • Scripts
  • JavaScript
  • AWS
  • Gallery
  • Misc
  • System Status

How to undo the last commit?

Posted on 01/03/202101/03/2021by justCurious

For soft reset (revisions are preserved)

Copy Code Copied Use a different Browser

git reset --soft HEAD~1

 

Hard reset (if you DON’T need the changes anymore)

Copy Code Copied Use a different Browser

git reset --hard HEAD~1

Categories How to'sTags Git

Post navigation

Previous Post What does git pull origin master do?
Next PostHow to execute Javascript on button click?

Tags

  • AHK (1)
  • AWS (32)
  • azure (1)
  • bash (2)
  • C# (1)
  • chrome (1)
  • cloud (6)
  • CMD (1)
  • concepts (1)
  • CSS (1)
  • developer (1)
  • docker (3)
  • EC2 (1)
  • ffmpeg (2)
  • GCP (1)
  • Git (7)
  • groovy (9)
  • Guides (1)
  • HTML (3)
  • JavaScript (5)
  • JavaScript Project (1)
  • kubernetes (1)
  • Linux (7)
  • mac (5)
  • Media (1)
  • Powershell (8)
  • SysOps (2)
  • utilities (2)
  • Visual Studio (1)
  • Windows (1)
  • XML (1)
  • Youtube (1)

Uptime Check

  • How to’s
  • Scripts
  • JavaScript
  • AWS
  • Gallery
  • Misc
  • System Status

Quote of the month

Pareto Principle – You’ll learn the 20% of the things that you’ll need to do 80% of the time, when writing a program in C#.

Uptime Check

Copyright © 2021 Curiousish