How to rename a TFVC repository in Azure DevOps project? - azure-devops

I need to rename a TFVC repository in Azure DevOps project. I do not see the option to How to rename a TFVC repository in Azure DevOps project? that:
For Git repositories, however, there is an option to rename a repository:

The TFVC repo follows the name of the Project. By renaming the project the repo should follow.
Open organisation settings
Select General and then projects.
Select the ... menu item on the project and choose Rename
See also:
https://learn.microsoft.com/en-us/azure/devops/organizations/projects/rename-project?view=vsts

Related

How to create a azure devops branch within a folder

Someone upgraded our TFS to Azure Dev Ops a couple of years ago. If I drill down one of the repositories in a project, there are dozens of folders some of which have branches within them. The icon I have boxed in red I assume is a branch:
I have created a brand new repository in DevOps via the browser interface, and while I have been able to create a few folders with projects, files, etc..., I cannot find a way to create a branch within a folder.
In Repo -> Branches, I see a New Branch button, but that branch will be created at the repo root. There does not seem to be a way to place a branch within an existing folder.
Is that correct? If not how can it be done? Perhaps via the command line somehow? Is this structure in the other repo because it was converted/imported from TFS?
There are two version control systems available in Azure DevOps / TFS:
TFVC (Team Foundation Version Control) and Git.
TFVC is a centralized version control system and is considered feature complete and no longer undergoing development. You can have one TFVC repo per Team Project. It supports folder-level branching within the repository. The screenshot you posted is from TFVC.
Git is a modern version control system. It is fundamentally different from TFVC on a deep technical level and does not support folder-level branches; branches are only at the repository level.
If you created a new repository within the team project containing your TFVC repo, it is, by definition, a Git repository.
The branches and merging strategies that you follow for TFVC and for Git are generally not interchangeable because of these core differences.
So to succinctly answer your question: You can't do what you want to do. If you are using Git, please look up common Git branching models such as GitFlow and GitHubFlow and choose one that is appropriate for your development scenarios.
In Repo -> Braches
You could create new branches within an existing folder with the format:
Folder Name/Branch Name

How to delete TFVC repository on Azure Devops?

I have 2 repositories linked to a project in Azure DevOps.
One repository is GIT and the other is TFVC. I wanted to try out TFVC, but turns out I will continue with GIT for support purposes. So I want to delete the TFVC repository on the project.
I understand that deleting the project will remove the repository, this is not an option for me.
I also know the following command : "tf vc destroy $/TestProject" removes the repository but it is not being removed from Devops completely which is a problem for me.
Other posts seem to be from 2018 about this subject. Is there anything added yet to simply remove a TFVC repository from a project?
The only way is to delete the project and recreate it. Otherwise, destroy is your best option.

cloning TFVC repo in azure devops using code

is there a way to clone/download a TFVC repo from azure devops using code?
and migrate to git is not an option the repo should stay in TFVC format.
There used to be an extension for Azure Repos that supported TFVC. But it's been deprecated since. The repo is still there, so you may be able to build a local copy. Or grab the latest (quite old) version.
Your closest alternative is to use the Windows Explorer extensions or Team Explorer. Or using tf vc on the commandline, like many hard-core git users only using git from the cli.

Azure Devops Repo branches

On my Azure DevOps I cannot see branches. How can I enable branches?
If you choose TFVC(Team Foundation Version control) as version control when you create a new project, the default repo will have no Branches page.
So, you can choose git as version control when you create new projects or create a new repo in this project. A project can only have one TFVC repository but can have multiple git repositories.
You can refer to the documents and learn more about Git and TFVC in Azure DevOps.
If you use TFVC you can't see the branches in the menu, you will see them under the "Files":
Only if you use Git you will see the Branches in the menu:

Forking Github into AzureDevops

I'm wanting to fork a github repo into AzureDevOps, whilst retaining the capability within AzureDevOps to keep pulling changes from github as-per forking a repo within github.
Is this feasible / on a roadmap?
I'm wanting to fork a github repo into AzureDevOps, whilst retaining the capability within AzureDevOps to keep pulling changes from github as-per forking a repo within github.
I am afraid there is no such out of box function of the "Fork" in GitHub for Azure Devops. But you can import repository from GitHub directly.
In Azure DevOps the project you want to clone the repository or create a new team project, click code tab. Click repository menu in Code Tab (it is on the top left side) and select Import repository:
Then, slect the SourceType GIT and add your github repository URL:
However, according to the ticket on the github:
Currently there is no Azure DevOps' build in support for automatically
updating your GitHub repo fork in Azure Repos.
We need do the sync manually on the dev machine.
Besides, there is an old document about How-To Fork Git Repositories on Visual Studio Online, but we still need to create a middleman to moderate changes from GitHub before pushing them into a VSTS project.
Hope this helps.