Reset Git Branches
If you merged a git branch into another branch by mistake or added a commit by mistake and you want to get back the brach to its remote state, you can just,
git reset --hard origin/branch-name
This will rebase the current branch you are working on to the latest commit found on the remote branch-name
Warning: take care while using this command as this may delete local commits or uncommitted changes you still didn’t add to git.














