I was doing some work in my repository and noticed a file had local changes. I didn\'t want them anymore so I deleted the file, thinking I can just checkout a fresh copy. I
To further clarify @Philippe Gerber's answer, here it is:
Before cherry-pick, a git checkout master is necessary in this case. Furthermore, it is only needed with a commit in detached head.
cherry-pick
git checkout master
commit
detached head