Work items commits state control

狂风中的少年 提交于 2019-12-12 03:47:40

问题


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?


回答1:


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.




回答2:


For some months this feature ist implemented, but has to be activated separately.

Then using the keyword fix, fixes or fixed #ID will close the workitem.

Detailed instructions: https://docs.microsoft.com/de-de/azure/devops/repos/git/resolution-mentions?view=azure-devops




回答3:


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.



来源:https://stackoverflow.com/questions/40679147/work-items-commits-state-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!