If you meant Storing Apache NiFi Versioned Flows in a Git Repository hosted on Azure DevOps, then the steps should be similar to the steps you followed to connect to Github.
The appropriate flowPersistenceProvider is GitFlowPersistenceProvider.
You can follow the steps as mentioned here: Storing Apache NiFi Versioned Flows in a Git Repos... - Cloudera Community - 248713
Or the video: https://youtu.be/kK7eVppg9Aw
Only changes you would have to do is to generate PAT in Azure DevOps with permissions on code read, write, modify.
P.S. The solution is only available for Git under Azure DevOps, and not for TFS.