Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Using TFS Online TFVC with command-line TFS utility on Mac

Install Command-Line TFS using HomeBrew on a Mac

Install Team Explorer Everywhere Command Line Client

  • Press Command+Space and type Terminal and press enter/return key.
  • Install HomeBrew by running command in Terminal app
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
  • Run:
brew install tee-clc
  • Accept EULA
tf eula

Configure Alternate Authentication Credentials in TFS Online

  • My Profile
  • Security
  • Alternate authentication credentials
  • Enable alternate authentication credentials

alternate authentication credentials screenshot

Create Workspace and Checkout

export TF_AUTO_SAVE_CREDENTIALS=1
tf workspace -new CompanyUniversal -collection:https://company.visualstudio.com/DefaultCollection
tf workfold -map $/Company/Company.Universal -workspace:CompanyUniversal /Users/chris/Documents/Development/iOS/Company
tf get

Commit changes

tf add * /recursive
tf status
tf checkin -comment:"Added test file from MAC tfs" -associate:7720

Configuring SourceGear DiffMerge to Compare Items

Download & install SourceGear DiffMerge

export TF_DIFF_COMMAND='diffmerge --title1="%6" --title2="%7" "%1" "%2"'

# Diff all changes
tf diff

# Diff single file
tf diff /Users/chris/Documents/Development/iOS/Company/Company.Universal.iOS/Info.plist

Other useful commands

tf undo /Users/chris/Documents/Development/iOS/Company/Company.Universal.iOS/AppDelegate.cs
@fcpauldiaz

This comment has been minimized.

Copy link

commented May 19, 2017

I'm getting this error: An error occurred: The SOAP endpoint could not be contacted. 404

What can I do?

@journeyman32

This comment has been minimized.

Copy link

commented Dec 4, 2017

I know this is a pretty dated comment but I was getting the same error a day or so ago, I removed the -"DefaultCollection" part from the https path and was able to get past that error. Thought I would offer that incase its helpful to anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.