Download

Git - checking out files bugged?

Good day everyone, first post here (also, I didn’t find a more fitting subforum so I decided to post here).

I’m currently trying to set up an UE4 project with git and so far it works, but checking out files seems to not be working correctly.
For now, I have two repositories on my PC and am testing how the checking out of files/assets work. As I understand it, you should normally, when editing something, first check the file out so that it is marked and no one else from the team can change it. This is done to avoid merge conflicts. So the basic procedure would be: checking out/opening the file while checking it out, editing it, saving it, pushing it, releasing it to access for others.
So even as long a file isn’t released, no one else can edit it and this should obviously be done in realtime.
However, when I edit an animation for example, it is only being checked out once I save the changed animation.
So I opened two cloned repositories, opened the first one, editted an animation, opened the second one, editted the same animation, closed both instances of Persona, et voilà, the same animation has a red mark indicating that both of them are currently checking the animation out. So in short, it doesn’t work at all and I don’t know why.

I have searched this problem on google and I found something that mirrors my problem 1:1, but no solution was given.
Here the thread in question: https://answers.unrealengine.com/questions/357509/git-check-out.html

When looking at the message log I see the very same message: apparently, git doesn’t support checking out files?
When I edit a file in project A, then save it (only after being saved it is marked as checked out), I look at project B and refresh the asset or restart the editor, but the animation is not marked at all.
And when I do edit a file in project A, save it, close Persona (then I can see it is checked out), then use the git plugin to submit, I have the option to keep the files as checked out.
When I tick that option, the submission fails. Message log says git doesn’t support checking out. When I don’t tick that option the submission works and the change is immediately pushed.

Can anyone clear this up or tell me his or her experience using git for UE4? Because I’m still quite new to this I can’t tell whether I made a mistake somewhere or if git really doesn’t support checking out (yet marks it as if worked in the own project).

Kind regards.

I am experiencing this same issue on my project and this is causing some workflow issues.

Git doesn’t support file locking like you described. Basically you’ll have to live with communicating with your team to make sure no two people edit the same animation at the same time, or use perforce instead.

Yes, Git is a distributed version control system and doesn’t support the concept of ‘checking out’ or locking of files. To avoid merge conflicts you have to just communicate with your team to make sure you aren’t working on the same files.

Or switch to a centralised VCS like Perforce that will let you check out files.

You can also use SVN - it is centralized version control too.