Is it possible to lock the files on Azure Repo in Azure DevOps

Occasional Contributor



I know only branch folder can be the lock on Azure Repo in Azure DevOps. I want to know if it is possible to the lock files on Azure Repo. Please give me your advice or suggestion.


Note: I know, I can able to lock the files using visual studio with integrated git version control. 

1 Reply


A folder or file tracked by TFVC can be locked or unlocked to deny or restore the user's privileges. Privileges include checking out an item for edit into a different workspace or checking in Pending Changes to an item from a different workspace.


 You can use a lock to temporarily freeze the server version of an item so that you can check in a pending change without having to resolve any merge conflicts. If you want to permanently prevent access to an item on the server, you should use the Permission Command instead.


To lock a folder or file from Source Control Explorer


  1. On the View menu, choose Other Windows,and then choose Source Control Explorer.

You can also double-click Source Control in Team Explorer.

  1. In Source Control Explorer, right-click on the file you want to apply a lock, and select Advanced.., then Lock.. (Visual Studio 2015) or Lock.. (Visual Studio 2013)
  2. In the Lock dialog box select the file or folder you want.
  3. Choose either the Check Out lock or the Check In lock type, and then choose Lock . .

Under Pending Changes, Source Control Explorer displays the status: lock. The next time your pending changes are checked into the workspace, the lock will be removed




Managed Azure Consultant