Why is GitDependencies.exe not ignored?

Hey folks, my question is regarding source control and the file GitDependencies.exe.

We have a repo for the team with UE4 source code and the game project and everyone pulls the repo, builds the engine and all is working fine except for the fact that after every build, the file in question becomes modified and Git sees it as something to be committed. Can anyone provide any details about what this file does exactly? What I understand is that it downloads the binaries required by the engine but why would it get modified by building on a local machine without adding anything or modifying anything in the engine.

It indeed downloads binaries as well as files that legally can’t be included in UE4 repository.

You sure that your teammates don’t build GitDependencies? because it’s source is included in there and it’s in UE4 solution.

That’s a good point actually, I didn’t modify the projects that are built with the solution. So it’s just a matter of excluding the GitDependencies project from building with an engine rebuild?

Should be, only reason why i think it would updating is GitDepencies actually update GitDepencies themselves

GitDepencies will need to be commited only if you buildGitDepencies in generated solution.
to avoid this (ex. by accident), right click on solution and uncheck building GitDepencies project file.

otherwise, if you already messed up, you can run (in the root of repo)

  1. git clean --force Engine\Binaries\DotNET\GitDepencies.exe
  2. git checkout GitDepencies.exe
  3. .\Setup.bat

and that will restore original GitDepencies file back

if git clean --force Engine\Binaries\DotNET\GitDepencies.exe does not work (surely because GidDependencis is tarcked file) then use

git rm -f Engine\Binaries\DotNET\GitDepencies.exe

references:

  1. Git - git-clean Documentation
  2. When should I use rm, git rm, git rm --cached, git add - Stack Overflow

I simply downloaded the entire git project as zip and copy-pasted the GitDependencies.exe.config and GitDependencies.exe in the original unreal engine cloned directory .\Engine\Binaries\DotNET\. It worked for me.