I have checked out from the main trunk and made some changes that I do not want to go back into the main trunk. If I create a branch in TFS after I have already checked out the code, how do I check my code into the new branch that did not exist when I originally checked out the code?
You need to shelve your changes and then unshelve it into another branch
Related
MS Team Foundation Server 2015, with the native TFS SCM:
On the main branch, every user can see pending changes from every other user.
I branched off a branch from the main branch with several check-ins in the past already. I'm currently having locally modified files on that branch and see them as pending changes in Source Control Explorer. However another colleague does not see these pending changes. Why?
(He can see pending changes on the main trunk just fine like everyone else.)
Is it a property of the branch that i need to set somewhere?
You need to check whether you have mapped the Main and Branch in the same workspace. And check whether you are using server workspace.
I started using TFS and I was not using branches for my project, but now I need to manage releases, so my Idea is to make Branch from the project and for every release create new branch from the main branch.. so
In VS2015 Source Control Explorer, i click on TFS project > Branching and Marging > Convert To Branch and this error happened
TF203028: You cannot create a branch at $/ProjectA because a branch alreadyexists at $/ProjectA/Main. If $/ProjectA/Main is not a branch convert it back to a folder and retry the operation.
the problem is that I don't see any branches in source control manager neither in TFS website, I created empty branch earlier but I deleted it. What to do ? I don't want to create new project with Main branch and copy/paste the source codes because I want to preserve the commits.
In TFS, you never really delete anything. In fact, if you look under Tools -> Options -> Source Control -> Team Foundation Server, there is an option to show deleted items:
To actually delete an item, have a look at the tf destroy command.
I believe that you can simple rename the folder, and that will maintain your history, should you not wish to permanently delete the old branch.
I am creating an new branch from existing branch using Source Control Explorer (TFS) in Visual Studio 2012.
I can't see any history from the original branch in the new branch.
Is there any way to force copy of original branch history?
The new branch contains the history of original branch. You need to check history for a single file (not a folder), then you should see the history:
We are using the release number for TFS branches. I have just created a new TFS branch with an upcoming release number. However, the client has since changed the release number which we would like to keep parallel TFS branch name.
The branch is new and no changes have been made to it yet.
What issues I can expect if I rename the branch?
Is it better to create new branch from main with the new release number?
A rename is a branch+delete under the covers.
You would be best creating a new branch with in tact history.
Suppose I create an experimental branch in TFS. Now, I am finished with the branch, and I want to keep it around, but it has diverged sufficiently from the source branch that I want to make sure that no one can merge it back on accident. Is there a command in TFS to sever a branch, so that there is no merge path back?
I'm not sure if this will prevent a merge but in TFS 2010 you can turn a branch in to a folder
Check out Buck Hodges blog on the subject
As far as I know, you can set permissions on a branch.