Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

visual studio 2012 - Check-in each project separately?

I have several projects hosted as separate TFS projects.

When I want to check-in changes, all the changes of all projects sum up together and commit as one check-in.

I want to handle the check-ins per project, so that the current check-in only commits the files of the current solution.

Here is what the TFS Pending Changes page looks like:

enter image description here

The red is "Project 1", the black is "Project 2", I don't want the black to be here at all.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There are several options:

  1. You can create separate workspaces for each project and only map the directories that belong to said project, that way the changes will not be 'shared'. See this on how to create separate workspaces for each project.
  2. You can also right-click the project and choose the Check-in option from there.
  3. From the pending changes window, right-click any folder or item you don't want to check in (yet) and choose exclude to exclude them from this check-in.
  4. One more option to have the pending changes window auto-include the right files is to go to the source control explorer and right-click the folder containing just the project you want to check in and pick check-in from there.

The reason for checking in all changes as one is to make sure the comitted version in source control is in a consistent, buildable state. Should you want to use a Continuous Integration or even Gated checkin build on the build server component that goes with TFS, you might get into trouble when checking in the projects one by one.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...