I am using git
under TFS, and I was associating commits to work items through #work-item
i.e:
git commit -m "fix #123"
Now I want to be able to change its status with something like:
git commit -m "Changed foo function. closed #125"
But it did not work. Is it possible?
There isn't any way to achieve this feature for now. There is already a feature request submitted on User Voice , you can vote it: Update work items on commit for git.
Ah so I am not familiar with TFS but you are trying to commit again and assuming there were no changes, and even if there were you would need to stage them first with
git add <filename>
you cannot commit again if there were no changes
however if you are just trying to change the previous commit message you can use
git commit --amend
source: https://help.github.com/articles/changing-a-commit-message/
however I don't think this is the correct method for what you want to do. I doubt any system would have changing commit messages as part of its process I would advise you investigate your system and it's requirements.