I have some incorrect commit/push
on my branch, then I want to revert to an old correct commit and push it on the current branch.
I have a problem with:
git log
new: xxxxxxx
...
old: ac758a3
git checkout ac758a3
git commit -m 'revert to old branch (ac758a3) to push it on current branch'
Out:
HEAD detached at ac758a3
nothing to commit, working directory clean
[EDIT]
Schematically:
- A(correct commit that I want) --- B(incorrect commit) --- C(incorrect commit)
So I want to have the following flow:
- A --- B --- C --- A
I want revert to A(old commit) and push it on current branch (the same branch).
What is the fast solution?
Thanks in advance.