godotengine / godot-git-plugin

Git implementation of the VCS interface in Godot
MIT License
720 stars 75 forks source link

Add file locking support (Git LFS) #235

Open clorl opened 7 months ago

clorl commented 7 months ago

LFS introduces a very helpful concept called "file locking" (Docs here and here. It is akin to the "checkout" feature in Perforce (not to confuse with checkout in Git which doesn't mean the same thing at all). Basically, you can "lock" a file, so you only are able to push it in the remote repo.

image

As a professional game dev myself, it was used a lot in the previous studios I worked in. It can be annoying, but it's really helpful for editing for example game levels. I know tscn files are text-based and should be suitable for merging, but in practice, unresolvable dependy errors often arise, which brings development to a halt.

The integration should be similar to Unreal Engine's Perforce integration, which means :

Tricky thing is, if an asset is referenced in a scene and that asset is changed, Unreal Engine will mark it as saved and will ask you to check it out. I do not know how Godot handles this.

I would very much like to bring this feature to the project with a pull request.

Mockups

Save Popup image

File browser image

Pull Popup image

phnix-dev commented 1 month ago

It would be nice to have a feature where you have to do a pull before you lock a file if it is out of date.

Leonardo-Rocha commented 1 month ago

Is this already in the works by someone @Calinou ? Otherwise I'd like to take on the challenge myself.

Calinou commented 1 month ago

Is this already in the works by someone @Calinou ? Otherwise I'd like to take on the challenge myself.

Not that I know of. Feel free to open a pull request for this 🙂