Use

git log --pretty=format:%H -n 1 | clip

to copy the entire hash and

git log --pretty=format:%h -n 1 | clip

to copy the abbreviated hash.