web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Merging issues in ADO

(0) ShareShare
ReportReport
Posted on by 40

Hello Team,

We are trying to automate the merging of two branches on TFVC (ADO), below is my snippet in powershell:

set-location c:\Temp\---

$comment= "checkin from A to B"
$commandLocation="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TF.exe"

$GetLatest="get $/A /force "

$Merge = "merge /force /version:T  $/A $/B
$Checkin = " checkin /comment:$comment /recursive /noprompt ""C:\Temp\---""

#Get Lastest Files From Sources Control
Start-Process "$CommandLocation" "$GetLatest" -wait -RedirectStandardOutput c:\temp\Get-TFS.txt

#Merge and Checkin to Main
Start-Process "$CommandLocation" "$Merge" -nonewwindow -wait -RedirectStandardOutput c:\temp\Merge-TFS.txt
Start-Process "$CommandLocation" "$Checkin" -nonewwindow -wait -RedirectStandardOutput c:\temp\Checkin-TFS.txt

error getting after running this code:

Exactly two items (source and target) are required.  Either local or server paths may be used.

Can anyone please help me on this! Thanks in advance!

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi Shubham sethi,

    Your question seems to be more related to Devops. Suggest to post a thread in the Devops forum for more help.

    Please check: developercommunity.visualstudio.com/search

    And you could find similar questions on the Internet:

    social.msdn.microsoft.com/.../tf-merge-not-recognising-my-source-and-target

    stackoverflow.com/.../unable-to-identify-workspaces-when-running-tfs-merge-command

    Have a nice day.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans