create a new branch from the current one : git branch new-branch-name push your new branch: git push origin new-branch-name revert your old (current) branch to the last pushed/stable state: git reset --hard origin/old-branch-name Some people also have other upstreams rather than origin, they should use appropriate upstream