Download

Using Git for 2 people working on a project simutaniously

I hope this is the right forum. I have myself and a cofounder working on a project at the same time and we run into the issue that if one of us makes a change to the same asset (a material, blueprint, the level etc) we get a git error about local files being overwritten and have to backup our work, and then overwrite our local files with whoever made the commit & push. ?

Our solution was to have 3 copies of all assets a _user1, _user2, and _master version but while I have not tested this fully yet, I would think this would make any casting and merging to the _master more complex than it needs to be.

What is the best solution? We are using bit-bucket private and SourceTree on a single branch.

Thanks.

Edit: Would perforce and a dropocean setup be a good solution since it integrates with the editor? Its just I work on the GUI for example which is tied to an actor blueprint and they have casts and bindings back and forth but if I edit the actor blueprint and commit then push, and he pulls, then it overwrites anywork he did on his actor blueprint at best, and errors out and prevents pulling period.

How often am I allowed to bump?

I can tell you git is no good for binary files. There are several tries to change that, don’t think one of them is good enough right now for us. Look for “git annex” or erm “git bigfiles” or byp or such, dont remember the name.

Better is to put the Content directory to .gitignore, and then use svn or perforce, or just manage it yourself and make a backup strategy for assets and talk about who does what when (prob okay for two ppl, wouldn’t think it works with a larger team).

Well we try to keep communicated the problem is hes adding functionality to the submarine blueprint such as say the periscope camera and when I build a new GUI screen with a new widget class BP that needs to read a value from his BP and say use the text(text) node in his BP to write the value on the HUD. I need to edit his BP to add in the cast to it, create widget, and add to viewport on key press T or whatever and add the text(text) node to see the changes on the GUI. So that means we are both working on the same file thus local file overwrite error and thus one of us has to go find that file locally, delete it, and they lose their local changes and pull in the others change.

Its a hugely inffecient way to work.

Im currently attempting to use the first person template but remove everything except whats essential for the blueman to run jump walk look etc. and then import our submarine interior and exterior and build a few placeholder widget GUI blueprints.

Any other suggestions so we dont lose a week of work would be appreciated.

Unfortunately using the Git integration in UE4 is highly experimental in 4.7.x. We do not have merge workflows set up for all asset types (only Blueprints at the moment, and that is early) so anyone using this plugin to work collaboratively will run into issues very quickly.

Historically UE4 has worked on an ‘exclusive checkout’ model, where assets cannot be edited by multiple people at once. We support this in the Perforce and SVN plugins, but Git does not have this concept.

Also unfortunately, we do not have any planned work to address collaborative workflow issues using Git in the near future.

If you are just two working on the project consider switching to mercurial, its very similar to git and has an extension to handle large files (the largefile extension ^^). Kiln hg from fogcreek (the guys behind stackoverflow) has a free plan for up to two people which has that extenaion.

File size isnt a problem, its the problem that is we are both working on the same asset (blueprint, level, collision, maps etc.) at the same time then both try to commit our changes, we get a local overwrite error and one of us has to delete our work. We’ve avoided this as much as possible by communicating constantly on what we are working on and such but we have to backup our level every push no matter what since it creates a local overwrite error (which is fixed by deleting your local copy to get the remote copy). We cant “merge” changes.

So perforce will say “user x added these nodes to BP1 and user y deleletd this node from BP1, and user x also added this to the map and user y deleted that from the map” and it all merges seamlessly?

What he means on “exclusive checkout” is that only one person works on a file at any given time. While that person doesn’t check the file in the other can’t work in that file.

And your problem happens because the files can’t be “diffed”, so they can’t be merged. On git, binary files are overwritten when a new one is checked-in (it mantains a full copy of the old one).

Yeah thats the system were operating on now. Makes it hard when very few binary files make up the majority of your high level game logic. Thanks guys.