Skip to content

Instantly share code, notes, and snippets.

@jakub-g
Created February 10, 2025 16:49
Show Gist options
  • Save jakub-g/124fdb93275fae71cd0249abef79ecfd to your computer and use it in GitHub Desktop.
Save jakub-g/124fdb93275fae71cd0249abef79ecfd to your computer and use it in GitHub Desktop.
Delete a git branch which can't be deleted
$ git branch -d foobar

> cannot lock ref ..> foobar.lock: File exists.

$ git update-ref -d foobar

✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment