What is the purpose of the ORIG_HEAD ref in Git?

Git Medium

Git — Medium

What is the purpose of the ORIG_HEAD ref in Git?

Key points

  • ORIG_HEAD is set by specific Git commands
  • It records the previous HEAD position
  • Enables easy undo with git reset
  • Not related to the root commit or remote HEAD
  • Helps in recovering from unwanted changes

Ready to go further?

Related questions