Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get current changeset id on workspace for TFS

Tags:

tfs

How do I figure out what changeset I currently have in my local workspace?

Sure, I can pick one file and view its history. However, if that file was not recently updated, its changeset is probably older than the more recently updated files in the same solution.

One possible mistake that we may make is that we view the history on the solution file, however the solution file rarely changes unless you're adding a new project / making solution-level changes.

In the end to figure out the changeset I need to remember what were the latest files changed and view their history.

Is there a better way to do this?

like image 372
boyan Avatar asked Oct 13 '11 00:10

boyan


People also ask

How do I find the latest changeset in TFS?

Take searching for a changeset in Visual Studio's TFS Source Explorer. Luckily if super easy to do! When you're in the Source Explorer, simply press Ctrl + G and the Find ChangeSet dialog will appear. From here you can type the changeset number and press OK.

How do I find my TFS changeset number?

Type the number of the changeset and choose OK. If you don't know the number, to find a changeset, In Source Control Explorer, on the menu bar, File => Source Control => Find => Find Changesets. The Find Changesets dialog box will appear.

How do I download changeset from TFS?

Just copy and paste url inside your browser and you are done. If you have not previously authenticated with your TFS or VSO you will be prompted for credentials, then the file is downloaded.


2 Answers

Your answer is on a MSDN blog by Buck Hodges: How to determine the latest changeset in your workspace

from the root (top) of your workspace, in cmd perform:

tf history . /r /noprompt /stopafter:1 /version:W 
like image 187
kroonwijk Avatar answered Oct 15 '22 18:10

kroonwijk


Run a Visual Studio CMD (in my case, for VS2015 is called: "Developer Command Promp for VS2015") and then get into your project folder and execute the following command:

tf history . /r /noprompt /stopafter:1 /version:W 
like image 33
xero399 Avatar answered Oct 15 '22 20:10

xero399