Download

Basic GitHub Questions

  1. For non-source assets (maps/textures/etc.) is there a way to lock access? How can you know if someone else is working on a file?

  2. Local version saving - is there a way to turn off local version saving? This makes no sense for a file that is huge, I only want the latest on my machine. The rest can stay on the server.

These concepts aren’t a part of the git model. The issue here is that Github pretends to be a centralized repository, just like TFS or SVN or Perforce, but it really isn’t; it is just a remote peer whose branches you happen to track locally against your own. What that means is that in the course of normal operation, git only really knows about your local working index and your local repository. The fact that you then push that repository to another peer is beside the point and git really doesn’t care.

So, to answer your first question, git has no mechanism built-in to know whether someone, somewhere, is working on a file in their local repository that they then will push to the same peer as you, in this case Github. I would suggest using branches and rebasing. Look into some of the well-established git workflows to get an idea of how to best work together with a team without clobbering each other’s changes. In the UE4 world, this becomes a bit difficult because of the binary files, so it will have to also entail some understanding of tasks between your team members.

As far as whether you can reduce the number of local revisions of a file you have, it again goes back to how git works. Because git is really just a local repository that you can sync with a remote peer, there is no way to sync those files and then delete them locally. However, you can squash old commits into one periodically to reduce the size of your repository. Unfortunately though, it would be very difficult to do that on a per-file basis rather than the whole repository history and you’d have to be very careful to sync up your peers after the fact or your trees will get out of sync and git doesn’t like that at all.