Point branch to new commit

Solution 1:

Solution

git checkout master
git merge C

With C being the SHA1 of commit C.

Result

                 D (dev)
                /
master A - B - C (move master HEAD)

It should be a fast-forward merge.

Solution 2:

Necromancy, I know.

git branch -f master C

Will not touch current working tree at all - you can have your work in progress.