We tried using Git LFS file locking in the team but bumped into a problem. We use self-hosted Gitlab instance to host the repository. The project is a Unity3D game. There is a plugin to show locked files visually in the editor.
The situation:
- Developer A changed the file test.txt in the feature branch BRA-1.
- The branch got merged into master.
- Developer A created the next branch BRA-2, locked text.txt there, and is working on it.
- Meanwhile, Developer B is working in the branch BRA-3. They saw new commits to master and decided to get up-to-date with master.
- Developer B merged master into BRA-3. They tried to push the changes to the server but the push was declined because text.txt was locked.
Can Git LFS be more smart about which changes came from a merge, and which ones were made in the feature branch? Can this situation be avoided somehow? We don't want to ask Developer B to unlock the file each time changes to it are merged into master and pulled into other feature branches.
Alternatively, we are ok with disabling lock checks on push. The feature we are after is being able to see which files are locked by whom, we don't need checks on push. But it doesn't seem it's possible to customize this on Gitlab.