If you already stage you local changes(which means you run the “git add xxx” already), you should reset the buffer zone first:
1 2 3
Now the buffer zone of the branch you’re working on is reset, but you local file still has the changes. Use the “checkout” command to discard your local file changes(If you didn’t stage your local changes as step 1 described, just do this step):
Now you local changes is totally discarded.