So I have a TFVC setup that has no Git branches however when I go to link a work item, it only comes up with Git, how do I link work items to TFVC branches? The only documentation I find all uses Git, for everything.
I am trying to have my tasks set up so that when a new task is created, I would create a branch off of Development for that task. However I can't seem to do this as everything is defaulting to Git and it seems like my workspace has no knowledge of the TFVC branches!
Link work item to Branch only support for GIT, it's not supported for TFVC. See Link types showing in the Development section for details.
For Team Foundation version control (TFVC), it lets you link work items to version control changesets or versioned source code files by using the Changeset and Versioned Item link types. When you check in pending changes or use My Work to check in changes, work items are automatically linked to your changes.
So, you can link work item with the link type Changeset or Versioned Item, or create another Git repository, you can use both TFVC and Git in the same project.
UPDATE:
That's a good idea to support TFVC, I have help you submitted the user voice here, you can go and vote it up to achieve it in future.
Related
I am very new to TFS. I have below Structure where I have my entire SOLUTION checked into my TFS online Repository.
Now, we are done with this Feature/Version.
What we want to do is...Leave this version AS IS and create a new Version / Branch out of this. This way if we ever have to go back to this version we can easily go back to it.
But Whenever I right Click on Root and Choose "Branch" Then I get an error that "The Bracnh Already Exists". I would like to name the new Branch "Release 2.0" or Something. But I cant Branch out my current Solution.
Creating New Folder option is Disabled.
Why is it disabled? I have full access to TFS/
You can't branch from the team project root. Reorganize everything to be in a trunk folder (TFVC convention is main, but you can call it whatever you want), and branch off of that.
For what it's worth, branches shouldn't be infinitely branching -- you should branch off of a trunk to do development, then merge back in when development is done. There are numerous reasons why this is the case, but I suggest doing some reading on TFVC branching strategies to find one that's appropriate for your organization.
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.
Suppose I have a team project with two branches: "main" and "dev" (fictional names).
As things are now, new code is merged into "main" without any code review. Also, anyone can check-in directly to it. We would like to change that.
I would really like to have something like Git's pull request functionality. I know we can use permissions to keep everyone from making check-ins at the main branch. We can also use permissions to make sure that only a reviewer can merge into the main branch.
But how can we review the difference between both branches before doing a merge?
I found out that the Code Review feature of TFS 2013 only works if you have the Premium edition of Visual Studio. Not all of the devs here have it, and we cannot install other editions for them, nor get VS2015 or later versions.
You can add a custom check in policy for code review before checking in. There is an existing Code Review Checkin Policy can be downloaded from website below, this policy allows you to enforce Code Reviews at checkin time.:
https://visualstudiogallery.msdn.microsoft.com/c476b708-77a8-4065-b9d0-919ab688f078
I recently introduced TFS to a project team that had not been using version control. Our structure is pretty simple:
MAIN branch for production-ready code
DEV branch for (complete) test-ready code
Feature branches for incomplete code not ready for testing
As I said, this team is not used to using version control. Over the holidays a well-motivated team member decided he would try to work on a feature, however he did this directly in DEV and made a number of check-ins. His feature is not complete so I don't want it polluting DEV for now, but I don't want to lose the history of changesets.
The obvious way is to make a new branch off the last changeset before his feature, merge the rest to the new branch, and rollback DEV. However, I'm afraid I'll lose the history of changes and be left with just a single "merge" changeset in the new branch.
If this is the case, is there a way to simply move all the changesets after a certain changeset into a new branch and keep the history?
EDIT: Basically I want to turn this:
DEV ---(1)--(2)--(3)--(4)--(5)--(6)--
into this:
DEV ---(1)--(2)--(3)----------------
\
NEW (4)--(5)--(6)--
This is not supported in TFVC ( nor any other SVCS). If you were using Git is TFS there would be hope, but not here. Your suggested solution is your only avenue.
At my work, we have a number of separate TFS projects that are combined together to form our Visual Studio solutions. These separate TFS projects are maintained so that we can reuse code across multiple solutions. Admittedly, this was a bad idea, as now when we have to branch we must branch each TFS project individually (we even wrote an app to do this). We end up with a project structure that looks like this:
$/Production/[superproject]/MAIN
$/Production/[superproject]/dev/[branch]
$/Production/[dependency1]/MAIN
$/Production/[dependency1]/dev/[branch/
where [superproject] requires [dependency1] within the solution. We end up mapping all these projects to the same workspace.
I would like to use Git-TFS in order to use Git in my day-to-day development. So far, the best way I have found to do this is to have a "master" git repo with a submodule for each TFS project. This way I can branch, diff, etc by using git submodule foreach.
Unfortunately, our policy regarding checkins is to have one changeset for a task, even if the changeset spans multiple TFS projects. This is fine if all my changes are constrained to one TFS project (i.e. one git submodule), but when I have changes across multiple submodules for one task then I don't know what to do. My current plan is to shelve each individualy using git submodule foreach 'git-tfs shelve mytask_$name' and then pull each into my TFS workspace, checking in from there. That only works for whatever TFS branches I have already mapped, which defeats half the purpose of using Git in the first place.
Has anyone encountered a similar problem? Are there any solutions already out there, perhaps using the TFS command line & a script? If not, I suppose I will spend some time creating a pull request for git-tfs. I am open to using Git-TF if the problem is solved there.
Thank you all in advance.
I think there is an effort in this way here : https://github.com/git-tfs/git-tfs/pull/350
you could have a look and contribute ;)