Skip to main content

I found a solution that worked for me.

  1. Re-clone the repository into another directory.
  2. Copy the .git folder from newly cloned repo & replace the one in the original repo.

This will repair the detached HEAD state which occurred as a result of (in this particular case) uncommitted changes that were discarded (but saved locally) when computer was forced to shut down.

I found a solution that worked for me.

  1. Re-clone the repository into another directory.
  2. Copy the .git folder from newly cloned repo & replace the one in the original repo.

This will repair the detached HEAD state which occurred as a result of (in this particular case) uncommitted changes that were discarded when computer was forced to shut down.

I found a solution that worked for me.

  1. Re-clone the repository into another directory.
  2. Copy the .git folder from newly cloned repo & replace the one in the original repo.

This will repair the detached HEAD state which occurred as a result of (in this particular case) uncommitted changes that were discarded (but saved locally) when computer was forced to shut down.

added 45 characters in body
Source Link
Don
  • 4.3k
  • 12
  • 52
  • 81

I found a solution that worked for me.

  1. Re-clone the repository into another directory.
  2. Copy the .git folder from newly cloned repo to& replace the one in the original repo.

This will repair the detached HEAD state which occurred as a result of (in this particular case) uncommitted changes that were discarded when computer was forced to shut down.

I found a solution that worked for me.

  1. Re-clone the repository.
  2. Copy the .git folder from newly cloned repo to original repo.

This will repair the detached HEAD state which occurred as a result of uncommitted changes that were discarded when computer was forced to shut down.

I found a solution that worked for me.

  1. Re-clone the repository into another directory.
  2. Copy the .git folder from newly cloned repo & replace the one in the original repo.

This will repair the detached HEAD state which occurred as a result of (in this particular case) uncommitted changes that were discarded when computer was forced to shut down.

Source Link
Don
  • 4.3k
  • 12
  • 52
  • 81

I found a solution that worked for me.

  1. Re-clone the repository.
  2. Copy the .git folder from newly cloned repo to original repo.

This will repair the detached HEAD state which occurred as a result of uncommitted changes that were discarded when computer was forced to shut down.