Jump to content

Delete changeset


jpadgett

Recommended Posts

I checked a new file in on the main branch then tried to merge it forward to the current child branches so that it would be included in the project when I began merging them back to the main branch, since they will make changes to this file. Afterwards, I realized I would like to add the file in a different way, so I was hoping to just delete the changesets attached to this file and start over, so to speak.

This issue began when I came upon this situation: I created a release branch off of the main branch. I then created two sprint branches off of the release branch. I switched my workspace to Sprint 1 and put my changes in. One of the changes was a new aspx file (we'll call it NewPage.aspx). I then went back to the branch explorer and switched my workspace to Sprint 2. When I tried to compile, an error was thrown saying that NewPage.aspx file was not found, and in the Solution Explorer (Visual Studio), the file was shown with the yellow warning icon over it.

When I started adding my projects in (I have a multi-project solution), I excluded the project files in my ignore.conf (*.csproj), AND I excluded the solution (*.suo) files. I assume that excluding the project files, at least, may have been the reason the file was not removed from my project view when I switched my workspace to Sprint 2. So I wanted to attempt to add the project file (with the new file not included in the project) in my main branch and merge it forward, checking it in each time, so that when I merge back I will have the difference in the project file in regards to the new file. It did not work as planned and the file still had an issue when I ended up back in my Sprint 2 workspace.

I probably need a little direction in both areas. Should I have my project file checked in? Should I have my solution file checked in? Is there a way to clean off those unnecessary changesets?

Link to comment
Share on other sites

I checked a new file in on the main branch then tried to merge it forward to the current child branches so that it would be included in the project when I began merging them back to the main branch, since they will make changes to this file. Afterwards, I realized I would like to add the file in a different way, so I was hoping to just delete the changesets attached to this file and start over, so to speak.

You can perform a subtractive merge to disintegrate a change that you don't want to have on a certain branch. This operation "undoes" the changes made on a changeset. Please, check the documentation to know more about this.

In this case it seems that the problem is a solely file, so you could revert to the previous revision of that file. This is a better idea.

I probably need a little direction in both areas. Should I have my project file checked in? Should I have my solution file checked in? Is there a way to clean off those unnecessary changesets?

I recommend to add the project files but not the suo files, as they are user preferences files. Everytime you switch between branches and update your workspace, your project should be updated accordingly, as long as the proj file is consistent.

I hope I've been useful; otherwise, please ask me.

Best,

Luis

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...