Skip to main content
edited tags
Link
Mureinik
  • 306.2k
  • 54
  • 323
  • 370
Source Link
user2372074
  • 841
  • 3
  • 8
  • 19

how to rebase changes in the master to detached HEAD safely

I did not realize I've been working on a detached HEAD (a32b42b123) branch until now. This branch is falling behind master a lot. I did the following operations, git checkout master && git pull origin master git checkout a32b42b123 && git rebase master to sync up this branch with master and noticed most of the changes I made in this branch are gone. Now I understand what a detached HEAD is. But how could I perform the git rebase master safety here without wiping out the change I made?