I executed git fetch on the non-master branch and pulled a lot of changes. How can I undo them?
In addition, I have a commit locally that has not been pushed yet. I want to undo the git fetch I just performed while retaining this commit. How should I do this?
No need to undo, git fetch has no effect on local branches.