Is there a way to lock a file when working with Git? Or how would I go about and notify co-workers that I'm currently changing a Java class so that they don't start working on it? Is there something in Git to prevent something like this to happen?
Ideally you'd be able to edit the file while co-workers also edit it, and git will help you merge your changes together. File locking isn't something Git allows, they favor good communication and collaboration instead.
No, it's not possible to lock files in Git, but Veracity is an alternative to Git that supports locking. However, even there, it is intended to be used for binary files, not text files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With