Have looked around and can't find the answer to this! I am a complete git n00b and really grateful for anyone who can give me some pointers.
I initially had one long branch of commits in my repository and I wanted to change the message I had assigned to a previous commit (master~14) in the branch
So I did
git checkout master~14
git commit --amend -m "added the new description for the commit bla bla bla"
Unfortunately now I was placed into detached head mode So then I panicked a bit and created a new branch so that I wouldn't loose the ref to this commit
git branch detached
Now I have a situation like this, where I have master~14 at the top of the tree on its own branch, and I want to put it back where it was in the tree, without causing any conflicts or overwriting anything
+ [detached] xxxxx
* + [master] xxxxx
* + [master^] xxxxx
* + [master~2] xxxxx
* + [master~3] xxxxx
* + [master~4] xxxxx
* + [master~5] xxxxx
* + [master~6] xxxxx
* + [master~7] xxxxx
* + [master~8] xxxxx
* + [master~9] xxxxx
* + [master~10] xxxxx
* + [master~11] xxxxx
* + [master~12] xxxxx
* + [master~13] xxxxx
* + [master~14] xxxxx
I would also like (after this is resolved) to branch off my commits from master~14..master~5 as one new tree and finally master~4..master as another tree.