Warning

The product is in closed beta and not open to the public.

unlock

vb unlock [PATH...] [OPTIONS]

Description

Remove locks on working copy files.

With lock-auto setting enabled:

  • add automatically locks newly added files.

  • commit checks locks and auto-unlocks after commit.

Commands with –lock and –unlock:

The options apply to all files affected by the command: –lock acquires locks before it runs and –unlock releases them afterwards. With lock-auto enabled, paths that stop being tracked are also unlocked automatically.

Options

-s, --skip-conflict

Skip files that conflict with this operation

-g, --global

Unlock files in the global branch

-v, --verbose

List files when the operation conflicts

-n, --dry-run

Show what would be unlocked without making changes

--force

Force unlock even if the lock belongs to another user (requires admin privileges)

Examples

  • Lock and then unlock a file on the current branch:

    $ vb lock Content/Hero.uasset
    LOCK trunk Content/Hero.uasset
    $ vb unlock Content/Hero.uasset
    UNLOCK trunk Content/Hero.uasset
    
  • Lock and then unlock multiple files:

    $ vb lock Config/DefaultGame.ini Content/Maps/Start.umap
    LOCK trunk Config/DefaultGame.ini
    LOCK trunk Content/Maps/Start.umap
    $ vb unlock Config/DefaultGame.ini Content/Maps/Start.umap
    UNLOCK trunk Config/DefaultGame.ini
    UNLOCK trunk Content/Maps/Start.umap
    
  • Lock and then unlock all tracked files in a directory:

    $ vb lock Content/Characters
    LOCK trunk Content/Characters/Hero.uasset
    LOCK trunk Content/Characters/Hero_Skeleton.uasset
    $ vb unlock Content/Characters
    UNLOCK trunk Content/Characters/Hero.uasset
    UNLOCK trunk Content/Characters/Hero_Skeleton.uasset
    
  • Create and then remove a global lock:

    $ vb lock Content/Maps/Start.umap --global
    LOCK G Content/Maps/Start.umap
    $ vb unlock Content/Maps/Start.umap --global
    UNLOCK G Content/Maps/Start.umap
    
  • Unlock files owned by the current user and skip files that are not locked:

    $ vb lock Config/DefaultGame.ini
    LOCK trunk Config/DefaultGame.ini
    $ vb unlock Config/DefaultGame.ini Content/Hero.uasset --skip-conflict
    UNLOCK trunk Config/DefaultGame.ini
    
  • --skip-conflict still fails when none of the selected files are locked by the current user:

    $ vb unlock Content/Hero.uasset --skip-conflict
    unlock: cannot unlock 1 file
      1 file not locked on trunk
    unlock: use --verbose to list affected files
    
  • Show detailed conflict information:

    $ vb unlock Content/Hero.uasset Config/DefaultGame.ini --verbose
    unlock: cannot unlock 2 files
      locked by another user:
        alice locked 1 file on trunk, expires 2026-10-16 10:30:00
          comment: Character update
          files:
            Content/Hero.uasset
    
      not locked on trunk:
        Config/DefaultGame.ini
    
  • Force-unlock a file locked by another user:

    $ vb unlock Content/Hero.uasset --force
    UNLOCK trunk Content/Hero.uasset
    

See Also