Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 782869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:27:15+00:00 2026-05-14T20:27:15+00:00

I have two TFS branches that do not have a direct parent/child relationship in

  • 0

I have two TFS branches that do not have a direct parent/child relationship in TFS. In a certain revision, 94 in my example, several items were deleted. I have been tasked with applying those deletes to the main branch. I’d like to do so through a baseless merge. I tried the following command to do so:

tf merge /baseless /recursive /version:94 .\programs\program1 ..\Release\programs\program1

Most of the items in the tree were marked as “merge”, and some were marked as “merge edit”. However, none of the items were deleted at the destination. On a whim i tried to merge over a single delete like so:

tf merge /baseless /recursive /version:94 .\programs\program1\source1.cs ..\Release\programs\program1\source1.cs

I got the following error message:

The item [TFS_PATH] does not exist at the specified version.

How do I do this? Is there a way to avoid making all those deletes myself?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:27:16+00:00Added an answer on May 14, 2026 at 8:27 pm

    I experimented a bit and here is my version of the above. seems to work for me:

    get-tfsChangeset xx |% {$_.changes} |? {($_.changetype -band $tfs.VCS_ChangeType::delete) -ne 0 } |% {$_.item.serverItem -replace "\$/branch1","$/branch2"} |  Add-TfsPendingChange -delete
    

    to make it even more useful, one can parametrize the changeset number and branch paths to allow for more convenient processing.

    for example, to process all deletes in a given branch run this from the source location:

    $sourcePath="\$/MySourcePath"
    $destPath="$/MydestPath"
    
     Get-TfsItemHistory ./*.sql -r -IncludeItems  | %{$_.changes} |
     ? {($_.changetype -band $tfs.VCS_ChangeType::delete) -ne 0 } |
     % {$_.item.serverItem -replace $sourcePath,$destPath} |  Add-TfsPendingChange -delete
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to merge to a branch that is not a direct parent
We have a TFS 2008 project with two branches (Main and NewFeature). Each is
Imagine the following situation: I have two branches: DEV and MAIN. I'm working on
I have two domains. TFS 2008 is installed on DEV domain, proxy on PROD.
I have a folder in Team Foundation Server with several sub-folders: candidates beta1 beta2
I have been using Git for my version control for a while now, but
I'm a bit freaked out because I've been handed this knot ball of vb6
We need to be able to simultanously maintain a set of different versions of
I did a stupid thing and branched my project on my local disk instead

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.