If you want to unlock a file without checking in any changes, you can undo a checkout. When you undo a checkout, you discard any changes you might have made and remove the lock. To undo a checkout:
If you change a file without checking out the file, the file has the status Changed. To discard changes and revert the file back to its original state, right-click the file and select Undo changes.