The first thing is to checkout the newest commit from the wanted branch.
git checkout [<branch>]
Then you need to get the commit-id you want to go back.
git log [-<number>]
Afterwards you can reset to the choosen commit based on the commit-id.
git reset --hard <commit-id>
At the end you have to sync it with the remote repository.
git push --force [origin <branch>]
Now you have undo all changes until a specific commit.