git - How to move commits on top of master if HEAD is detached? -


sorry, noob here.

i've researched this, refers branches , i'm not sure i'm dealing branch.

a while ago messed website i'm working on over process of 4 commits. went 4 commits, , kept working there. since i've saved maybe 10 commits, never "officially" made branch, i'm not sure if i'm on branch. i'm not on master because left long time ago.

how make i'm working on master branch?

added per request:

$ git branch -v  * (detached 626a6f1) aea944b trying make new branch    bottom_drop_side_menu 46e7358 quick save    lowermenu 4e89d92 here's kind of nice lower menu. client doesn't dig :(    master 2071f52 categories arent working... 

simply make new branch (on detached head aea944b):

git checkout -b tmp 

and replay on master:

git rebase master 

then merge tmp in master

git checkout master git merge tmp 

see "why did git repo enter detached head state?".


Comments