Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3807848
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:03:21+00:00 2026-05-19T15:03:21+00:00

Looks like a few days ago I created a branch called detached HEAD and

  • 0

Looks like a few days ago I created a branch called detached HEAD and have been committing to it. My normal process is to commit to master and then push that to origin. But I can’t push detached HEAD.

My next stop screwed me. I selected git checkout master – and my detached HEAD branch disappeared. Going back to my project all of my changes in the past few days have been wiped.

Is there anyway I can get those changes back?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:03:22+00:00Added an answer on May 19, 2026 at 3:03 pm

    If checkout master was the last thing you did, then the reflog entry HEAD@{1} will contain your commits (otherwise use git reflog or git log -p to find them). Use git merge HEAD@{1} to fast forward them into master.

    As noted in the comments, Git Ready has a great article on this.

    git reflog and git reflog --all will give you the commit hashes of the mis-placed commits.

    Git Ready: Reflog, Your Safety Net

    Source: http://gitready.com/intermediate/2009/02/09/reflog-your-safety-net.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been fighting with this for a few days now and it looks like
I've been using Resharper for a few days and I really like this tool,
Over the past few days, I have been trying to find an answer to
I started to learn Rails a few days ago and also have not much
I'm really confused and have been scratching my head over this for a few
I have a servlet that was running fine until a few days ago. But
A few days ago I posted some code like this: StreamWriter writer = new
I have been working on this issue for a few days now and can't
This problem has been kicking my butt for a few days now. I have
Prologue Two days ago I installed a few obfuscators. The setup process of Eazfuscator

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.