What is the Git equivalent of marking a working copy in Subversion?


I've got a project which has a manifest file (which includes a version number), but not a build process. When I was using Subversion, I'd handle this by changing the version number in the manifest from "SVN" to "1.3" or what have you, tagging from the working copy, and reverting the manifest. The version number then exists in the tag, but remains "SVN" in trunk.

Is there an equivalent for this in Git? It seems it should be possible to create a branch, commit the version number on it, tag, and delete the branch (leaving a headless tag), but that seems rather convoluted.

git commit -m "Change manifest version to vX.Y"
git tag -a -m "MyProject vX.Y" vX.Y
git reset --hard HEAD~1

The git reset command lets you wind your branch pointer back to an existing commit.