Download

Git source control beginner questionS

Hello every body !
I work on a game with a very small team and we just started to work with git.

Here’s what we have now :

  • A server with git (provide by microsoft : vsts)
  • On this, we have a repo in witch we have uploaded the needed files of the project with tortoise git (we use the typical .gitignore for UE4)
  • We can do anything we want with tortoise (push or pull from/to the server)

Of course, we can already work this way but we are trying to enabled the source control in the editor.
And doing so, we figure that there’s a lot af thing we don’t understand.
This is what I found on the doc page : https://docs.unrealengine.com/latest…SourceControl/ :


There’s a vocabulary problem :

  • the Depot is the online repo ?
  • What means check out / in ? Am I wrong to say that a checked out asset is kind of reserved by the user who checked it out and can’t be modified by other users ? And we need to check it in to free this asset ?
  • When I try to save a checked out file, I’ve got an error but when I checked it in, it is saved locally. We don’t use the save button with source control activated ?
  • under the ! icon, I read “newer version of file exist in source control” and that’s where I realize that I don’t know what’s source control is… Is it the online repo ?
  • Then, what’s a depot ? Is it also the online repo ?
  • I don’t get the difference between push file on the repo and “commit”.

When I check a file out, the information somehow go through the git online repo to lock the file in other users editor ?
When I check it In, it is saved locally but I still need to push the newer files on the repo with tortoise, no ?
The tests we did are not very conclusive but we may be totally wrong on how to use it…
Now, we just use tortoise to update the repo with the files we build locally and inform the other users through discord on what we are working on :frowning:

To be short, can you give me a quick look at how we should use the source control… Or point me to a documentation that explain it to someone who is a real beginner (every thing I found on this subject concern people how do know what source control is).

BTW, the git plugin in the editor is the same thing as the plugin develop by SRombauts (https://forums.unrealengine.com/deve…rovider-plugin) or I should install this ?

Hi JoGoiA, just a quick answer since I am not in front of a computer.

Firstly, yes the integrated UE4 Git Source Control Provider is the plugin I develop :slight_smile:

The official documentation is only for Perforce and Subversion (though I provided some documentation on a still sleeping Pull Request)
-> I should improve my README and/or the wiki

The ‘Checkout’ operation is not available with the Git plugin (currently, without git LFS 2 Lock support)
-> checkout red icon translate to ‘modified’ state

The ‘Depot’ is the local repository (the .git folder)

‘Push’ is not implemented (though I’ve started various work on the subject, it will come with Git LFS 2 support)

Other than that you should really be able to work normally with the plugin. I do :slight_smile:

As a matter of quick tutorial, as you already have Tortoise Git setup, you can think of the Editor Source Control as a “asset state viewer” with capabilities to display history of a Blueprint with Visual diff :slight_smile:

When you add new assets they should be marked for add by the plugin.
Whenever you edit assets, you should be able to save them.
But remember they are not ‘checked out’ so not locked nor reserved whatsoever (git LFS 2 could do that, not currently supported)

You can finally commit (use “Check-in” ) a set of assets with a “changeset” message.
But remember that you have to push them manually to the server when you want to.

OK !
Thanks a lot for your answers, SRombauts :slight_smile:
Did I understand everything well ?

  • We just have to wait for your plugins to work with LFS 2 to have every option directly in the editor.
  • Until that, we can use icons to get some info on the state of a file but we can’t push them directly from editor yet.
  • The check out icon is just a remainder that I modify an asset and I have to push it but it is not “transfered” to the other users yet.
  • So, we need to work with tortoise to push / pull file to the server.
  • Depot is the local folder and “source control” will be the online folder when LFS 2 will be implemented.

I will read your doc ASAP !

If I’m right, that’s fine !
Thank again for your answer and your great work ! You can count me (and my mini team) as great supporters of you:)
(do you have a Patreon or something like that for make our support more real ? How can I bought you a beer ?)

Go Go SRombauts, Go !
:slight_smile:

EDIT : I’m actually reading the documentation you provide here : Unreal Engine 4 Git Source Control Plugin | UE4GitPlugin
Do I need to install the v2 version of your plugin as mentioned in the doc or is the 4.16 version of the engine up to date ?
I also found your Paypal :slight_smile:

The error that happens while saving file is gone now. I think that I was actually pushing some file with tortoise while we tested yesterday…

Well, more or less, Git LFS 2 should bring everything in the Editor, but it would require a compliant server (for now Github is compliant since it is developing LFS!). Also, I would like to make more things working for everybody else, but this is why I failed in the first place, trying to do too much different things while I do not have enough time to dedicate to it.

Exactly!

No, the “check-out” icon means “modified”, but you still have to “check-in” (commit) locally. When you commit, the icon disappears since it is now in the same state as the local repository, but you still have to push the change! Instead, you can also make some more commits, and only push once a little bit later (but don’t wait too much so other devs get the change ASAP)

Exactly!

Yes, sort of: with LFS I will need to add something like “Check-in = Commit + Push + Release Lock” so your local repository/depot will sync with the online Git LFS 2 repository

No need, the v2 version of the plugin is only a sort of a preview of what’s coming next for future version of the Engine, and it has even been somewhat unstable lately.

I think you may have found that I’ve recently added a

PayPal link to my README. If so, thank you very much, you are officially my first supporter (after Epic Games, indeed!) and that means a lot to me :slight_smile:

Got it !
You rock ^^

Now I hope that vsts will support LFS 2… It does support LFS 1 so…

I’ve just released a new v2.2 of the Git Source Control Provider plugin for Unreal Engine 4.17 with many bugfixes of upcoming UE versions!

By witch I mean, many fixes I’ve proposed as Pull Requests for UE4.18 and UE4.19, that are packaged in the “dev” version of the plugin, and made available for UE4.17 (backported) :slight_smile:

That’s cool ^^ I will make the update but I have to say that we have no problem at all with the actual version of the plugin :slight_smile:
Thanks again ^^

I’ve just released a new v2.3 of the Git Source Control Provider plugin for Unreal Engine 4.17 with initial support fot Git LFS 2.x File Locks!

Edit: Works best with Git LFS 2.3.0 contains in today’s git for windows

HoHo !
I will look at this immediately :slight_smile:

Visual studio team service seams to be compatible with file lock through Git LFS 2.1 :slight_smile:

Edit: Works best with Git LFS 2.3.0 contains in today’s git for windows

Hey SRombauts !
Since a while, i used tortoise git to manage my project but i just turned my project into 4.20 ^^
when I saw it includes a new version of your plugin, I tried it and it was perfect !
Well done, guy !

Merci mec :slight_smile: