Waiting for 'git status' command to complete making for long compile times

Just updated from 4.15 to 4.18.2 and compiling now has crazy long spin up time w/ suspicious ‘git status’ messages I don’t remember seeing earlier.

Any ideas here? Used to blow right through these projects when the target was up to date.

4 >------ Build started: Project: UnrealHeaderTool, Configuration: Development_Program x64 ------ 
2 >  Using 'git status' to determine working set for adaptive non-unity build. 
2 >  Waiting for 'git status' command to complete 
2 >  Target is up to date 
2 >  Deploying UnrealCEFSubProcess Win64 Development... 
2 >  Total build time: 13.54 seconds (NoActionsToExecute executor: 0.00 seconds) 
5 >------ Build started: Project: UnrealLightmass, Configuration: Development_Program x64 ------ 
4 >  Using 'git status' to determine working set for adaptive non-unity build. 
4 >  Waiting for 'git status' command to complete 
4 >  Target is up to date 
4 >  Total build time: 13.83 seconds (NoActionsToExecute executor: 0.00 seconds) 
6 >------ Build started: Project: UnrealPak, Configuration: Development_Program x64 ------ 
3 >  Using 'git status' to determine working set for adaptive non-unity build. 
3 >  Waiting for 'git status' command to complete 
3 >  Target is up to date 
3 >  Deploying UnrealFileServer Win64 Development... 
3 >  Total build time: 14.42 seconds (NoActionsToExecute executor: 0.00 seconds) 

… you get the idea …

Hi! I have the same issue. In my case the git status timed out almost every time i build my project. This behaviour increase significatively my compilation.

If anyone know why in 4.18+ a git status command are fired when Visual Studio compilation.

In second time depending on impact how to disable this behaviour.

I have found some answer in UE4.18 release note. The git features is enable by default if you have git folder in your project directory. This feature is used to exclude most iterated file from unity build. This is suppos decrease the compile (If you build the engine often indeed this feature is usefull, but in most case not).

To disable this behaviour you could change settings in BuildConfiguration.xml:


*Added support for adaptive non-unity builds when working from a Git repository. The ISourceFileWorkingSet interface is now used to query files belonging to the working set, and has separate implementations for Perforce (PerforceSourceFileWorkingSet) and Git (GitSourceFileWorkingSet). The Git implementation is used if a .git directory is found in the directory containing the Engine folder, the directory containing the project file, or the parent directory of the project file, and spawns a “git status” process in the background to determine which files are untracked or staged. Several new settings are supported in BuildConfiguration.xml to allow modifying default behavior: Default git *

Source : Unreal Engine 4.18 Released! - Announcements - Unreal Engine Forums

hmmm…I’m getting some compile errors:

23>EXEC : error : C:\UnrealEngine\UnrealEngine\Engine\Saved\UnrealBuildTool\BuildConfiguration.xml(47): The 'https://www.unrealengine.com/BuildConfiguration:Provider' element is invalid - The value ' none ' is invalid according to its datatype 'String' - The Enumeration constraint failed.
23>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "C:\UnrealEngine\UnrealEngine\Engine\Build\BatchFiles\Build.bat SymbolDebugger Win64 Development -waitmutex" exited with code 1.
23>Done building project "SymbolDebugger.vcxproj" -- FAILED.

This is the content of my xml file:

<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
		<Provider> none </Provider> 

I’m sure I’m doing something stupid…

Change it to:

<Provider> None </Provider>
<!-- May be None, Default, Git or Perforce -->

see: Unreal Engine 4.18 Release Notes | Unreal Engine Documentation

Replying to an old post to add the following:

I fixed this problem, but my issue may have been different than OP’s. I was using git in Cygwin while compiling in Windows. The caching for unix-based and windows-based systems is completely different, so a git status in one was invalidating the cache of the other and forcing it to spend an extra 30s or so doing git status checks. This went away completely when I switched from Cygwin to git bash.

Now it’s lightning fast.

Worked for me with UE5