how to go back to origin from feature branch code example Example: revert to master origin branch git git checkout mybranch git reset --hard origin/mybranch