Jack Fairfield
Jack Fairfield

Reputation: 1974

How do I make my local files become the latest changes in tfs?

After getting a specific version of the project and making some changes, I want to commit these changes and ensure that no files change and my local copy becomes the latest version that people can pull.

Oops. Looks like something similar was asked here:

How to get specific changeset version treated as changes relative to latest version?

Upvotes: 1

Views: 724

Answers (2)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51083

Update

It's not able to do this , when you commit your local changes, TFS will automatically compare yours local changes with "the latest" version on sever, it will not pick up the specific version, you have to solve the conflicts manually. Unless you directly roll back your changeset to the specific version you got.

Another workaround, just like jesse mentioned in above link, you could use shelveset to temporarily store the specific version code and get latest on your local workspace, resolve the conflicts locally first. Then you don't have to solve it when you do the commit.

To sum up, there are changes between the specific version/changeset with "the latest", you have to resolve the conflicts, either when you pull files down to workspace or commit back to server. Unless you commit your changes to server, other people could be able to pull your version.

Upvotes: 2

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30372

Generally you just need to check in/commit these changes to remote TFS repository, but you may need to resolve the conflicts (conflicts between your local version and the current latest version) during the check in. Just keep the local version When resolve the conflicts. See Resolve Team Foundation Version Control conflicts for details.

Another workaround is creating a new branch, then check in/commit your local version to the new branch. Thus it becomes the latest versiont on the specific new branch. And team members can get latest from this new branch.

Upvotes: 1

Related Questions