I have branches master
and devel
.
I want to save devel
somewhere for the (unlikely) case if I will need to restore the information in it and afterward to reset the head of devel
to the head of master
(without modifying master
).
Is the following the right way to do this?
git checkout devel
git checkout -b devel-save
git push
git checkout devel
git reset --hard master
git push --force