Are there local commits in TFS?

杀马特。学长 韩版系。学妹 提交于 2019-12-04 16:24:17

问题


Does TFS support local commits?

In other words: Can I

  1. modify the code,
  2. make a local commit (without sharing these changes with others),
  3. test my modifications and
  4. if my changes didn't break anything, do a global commit (thereafter my changes are available to other developers)

in TFS 2012?

If it doesn't, are there any workarounds, which allow this functionality?


回答1:


No it doesn't support this, however it does have a couple of alternatives you can use instead.

1) Branches - All developers work on their own branch then merge to trunk/main when they're happy with their changes.

2) Shelveset - developers shelve any change they don't want to commit yet. This lets you undo your change, or pass it to another developer on the team without losing the change or checking into the main branch

3) Gated Checkins + Unit/Automated tests. Any time a developer checks in, TFS Automatically shelves the changes and runs the tfs build + any associated tests (unit or automated). If everything succeeds then it is checked in. I don't believe this supports manual tests.

or a mix of all of the above.




回答2:


TFS does not support this by itself.

However! Microsoft released Git integration with TFS. Brian Harry blogged about this: Announcing Git Integration with TFS a couple of weeks ago.

Using this setup you can use Git for your local commits and then commit it to Team Foundation Server.




回答3:


Not for the on premise version of TFS (yet), but as of January 2013 Microsoft's hosted Team Foundation Service has Git support, which obviously supports local commits.

http://tfs.visualstudio.com/en-us/news/2013-jan-30.aspx#git%20support



来源:https://stackoverflow.com/questions/12636222/are-there-local-commits-in-tfs

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