WordPress as git submodule, accidentally updated through WP admin instead of git, now modified content

Solution:

The following commands worked perfectly:

git clean -dfx             # delete everything in the worktree that isn't tracked
git reset --hard           # wipe all modifications to tracked files
git checkout 3.8.1         # return to previous version tag

I checked the documentation on git clean to learn what the options ‘d’, ‘f’, and ‘x’ were: https://www.kernel.org/pub/software/scm/git/docs/git-clean.html. After I ran the previous commands within the WordPress directory, I was able to then checkout version 3.9, thus correctly updating WordPress.