I want to sync my local repository so as to make the local an exact copy of the master. Since checking it out I have added several files to my local, not present in master, that I do not wish to commit. Nevertheless, in this procedure, I want to erase all differences of my local from master: when I am done, the additional files in local will have been deleted.
An earlier question offers a strategy to make local like master: Reset local repository branch to be just like remote repository HEAD
But this does not work for me. The recommended commands, git fetch origin git reset --hard origin/master
do not erase the additional files from my local, even though git status indicates local and master are identical. And also, in one case the master's version of a file did not replace my local version.
Any ideas on how to do this?