It is possible to join more TFS changsets into one? - tfs

I made several terrible changesets, is it possible to join/group them to one changeset ? Because I would like to keep the meaningful and readable commit history.

Unfortunately, this is not support in TFVC. And there had been a feature request in uservocie called TFS to merge multiple, non-continuous changesets which has been declined by the PM of TFS.
Thanks for the feedback on this idea. We have reviewed this feedback
and determined that we will not be able to complete this
suggestion in the foreseeable future.
Matt Mitrik TFS Program Manager
March 12 2015
For your situation, you can either edit the comment just like AakashM suggested or try to use Visual Studio add-on TFS Productivity Tools.
Moreover, about how to edit the changeset comment, please refer the answer in this question: Edit changeset comment after updates have been checked in to TFS

Assuming you mean like a git "squash", I'm afraid not.

Related

What is the easiest way to rename a shelveset in TFS?

I'm trying to rename a shelveset. The only way I can think of to do it is:
Unshelve it (uncheck Preserve shelveset on the server)
Gather all the changes into Included Changes (and exclude everything that wasn't part of that shelveset).
Re-shelve it with a different name
Is there an easier way?
(we are using TFS Version 15.117.26714.0)
What is the easiest way to rename a shelveset in TFS?
Personally think the method you think is the simplest or most direct.
Since TFS teams Suggested on their old user voice forum(Closed now):
Visual Studio Team (Product Team, Microsoft) responded · March 11,
2015 Thanks for the suggestion! We’re currently in the planning
process for enabling an iterative shelveset experience. We’ll update
this item when we have more details.
But so far, we do not have a very easiest way to rename a shelveset in TFS. And we do not have a "update shelveset" API in place:
Shelvesets
Do not have option to rename the name by the Shelve Command.
You could check this thread for some more details.
So, I agree with your idea is the easiest and most straightforward, and it is also the method I have used.

Does TFS support multiple pending changelists like Perforce?

I am used to working with Perforce and I really like the ability to be able to group checked out files under different pending changelists. For example, if I am working on two bugs at the same time and the changes made for them can be grouped separately.
I am unable to find this functionality in TFS. Is this supported? If no, what is the best practice around it?
I am using VS 2015 Professional with TFS Server 2015.
No, it's not supported with pending changelists in TFS for now.
To be a workaround, this is possible using the Suspend/Resume feature in Visual Studio 2012 and above. It will allow you to keep multiple shelvesets, associated to multiple workitems. Only problem is that you can't have all two bugs open at the same time, so you'll have to check them in one by one.
More detail info please refer this link: Suspend your work and manage your shelvesets

Combine Commits within TFS

So in Git you can squash multiple commits into a single commit. So for example, let's say I checked in a change, but I realized I forgot something small, so I make the change locally and then I commit again. With Git squash you can merge those into one commit.
My question is does TFS have any sort of method for doing the same thing?
No. TFVC uses a totally different version control paradigm than Git; it does not support history rewriting actions like squashing and amending.
No, its not supported. You can't change the history of every changest in TFVC. If it can be achieved , it's a violation of the principle of source control.
And also you can't create a new changest then merge with the old changest, There have been a featured request in Uservoice and be declined by PM of TFS.
TFS to merge multiple, non-continuous changesets.
Thanks for the feedback on this idea. We have reviewed this feedback
and determined that we will not be able to complete this suggestion in
the foreseeable future.
Matt Mitrik TFS Program Manager

how to update existing shelve set in tfs

My team is using shelving for code review, for X++ code. Which is not a native visual studio language. So you can consider like we storing text files in TFS.
For code developer create a shelve and send it over to the team to reviews it and send feedback. But when the developer address the comments and generates another shelve the comments are lost.
For the reviewer,it becomes difficult if there original comments were addressed or not. The only way is compare 2 shelve code on 2 screen, which is a pain.
This function is not supported by now.
Visual Studio Team (Product Team, Microsoft) responded · March 11,2015
Thanks for the suggestion! We’re currently in the planning
process for enabling an iterative shelveset experience. We’ll update
this item when we have more details.
Source: VS UserVoice
If you just want to replace the exist shelvest(will lose comment either), a trick way can be used: create a new shelf with the same name and then confirm "Replace shelveset"
If you want to check the old comment, I suggest you can use Email Alter in TFS. After setting it, you will get a E-mail notification including detail information of the code review. A sample as below:
Updated
Also agreed with Wouter de Kort and Vicky. The biggest advantage of code review in TFS is that you can suspend and resume your work anytime. No need to pay attention to shelvest.

Can I do merges with the TFS offline?

We are having a problem with the TFS connection. Is there any way to do merges between branchs with the TFS down?
I don't think so since TFS merges items by comparing the items from the source/target branch which at least one would be on the server.
It would make no sense to do so. If your TFS is offline, you cannot know whether you would merge the newest source code state. This would be highly insecure since it leads to code missmatch.
If you want to merge some code offline, do it manually with tools like WinMerge and update it to your TFS when its online again ;)

Resources