I have a commit(A) in my local repository which I do not intend to push yet. Right now, the HEAD is at A. Let's say I want to create another commit(B) NOT on top of commit(A), but on top of the previous commit than commit(A).
How do I assign my local HEAD to the previous commit without losing the latest commit(A)?
I DO NOT want to undo/remove commit(A), I want to save it for later to rebase to the latest commit in my branch. After creating the commit B, I want to put commit(A) on top of commit(B).
Kind of like :-
C1 -> C2 -> A(HEAD)
to finally
C1 -> C2 -> B -> A(HEAD) (eventually)
How can I do this?
Edit :- I have a restriction to do this without using another branch.