I\'m writing some scripts for my Git workflow.
I need to reset other (existing) branch to the current one, without checkout.
Before:
Current
The workflows you describe are not equivalent: when you perform reset --hard you lose all the changes in the working tree (you might want to make it reset --soft).
reset --hard
reset --soft
What you need is
git update-ref refs/heads/OtherBranch refs/heads/CurrentBranch