I assume that you just need to reset return this file to the version on master , and not erase the change history, fix it? The former is easy, the latter requires modification of the story and should not be done lightly (especially if you clicked a branch outside your local repo).
In reset, the contents of the file foo/bar/baz.txt will return to the state that it has on master , just check your branch and run
git checkout master -- foo/bar/baz.txt
This will capture the file from the wizard, write it to your working copy and place it in the index. Now you can just git commit , and your file will now match that on master .
source share