Skip to main content
3
poke
  • 382.1k
  • 78
  • 582
  • 621
Post Closed as "Duplicate" by poke git
added 131 characters in body
Source Link
bluethundr
  • 1.2k
  • 19
  • 74
  • 149

I committed a change to my script that completely broke it. I tried restoring to a previous commit in git using this command:

git checkout 2af6889905af99b78f7401cb17b718ba86240c2a aws_utils.sh

But now I'm stuck in a detached head:

git branch -a
* (HEAD detached at 2af6889)

The branch that I am working in is called: update_aws_delete_user_function.

I am not working in the master branch currently.

How do I merge the functional file in the hash 2af6889 back into the main branch called origin/update_aws_delete_user_function?

I committed a change to my script that completely broke it. I tried restoring to a previous commit in git using this command:

git checkout 2af6889905af99b78f7401cb17b718ba86240c2a aws_utils.sh

But now I'm stuck in a detached head:

git branch -a
* (HEAD detached at 2af6889)

How do I merge the functional file in the hash 2af6889 back into the main branch called origin/update_aws_delete_user_function?

I committed a change to my script that completely broke it. I tried restoring to a previous commit in git using this command:

git checkout 2af6889905af99b78f7401cb17b718ba86240c2a aws_utils.sh

But now I'm stuck in a detached head:

git branch -a
* (HEAD detached at 2af6889)

The branch that I am working in is called: update_aws_delete_user_function.

I am not working in the master branch currently.

How do I merge the functional file in the hash 2af6889 back into the main branch called origin/update_aws_delete_user_function?

Source Link
bluethundr
  • 1.2k
  • 19
  • 74
  • 149

git stuck in detached head - cannot revert to previous file in branch

I committed a change to my script that completely broke it. I tried restoring to a previous commit in git using this command:

git checkout 2af6889905af99b78f7401cb17b718ba86240c2a aws_utils.sh

But now I'm stuck in a detached head:

git branch -a
* (HEAD detached at 2af6889)

How do I merge the functional file in the hash 2af6889 back into the main branch called origin/update_aws_delete_user_function?