We have an Xcode CI bot installed to poll our git repository for new commits and builds accordingly. It usually works fine. However, after forced shocks (I know), the bot will fail and will never build correctly. The solution was to remove the bot and start all over again (and exhort yourself for pushing the force).
There is no error in the Xcode build logs by clicking on the console, we can only confirm what the problem is (see the last log) ...
Jan 28 08:15:51 macmini.local xcsbuildd[80853]: [CSBotSCMAction gitCloneRepositoryAtURL:branch:destinationPath:createDirectoryNamed:completionBlock:] : https://github.com/XXXXXXXX/iOS.git
Jan 28 08:15:51 macmini.local xcsbuildd[80853]: newRepoURL: https://github.com/XXXXXXXX/iOS.git
"https:\/\/githubuserformacmini@github.com\/XXXXXXXX\/iOS.git",
"https_github_com_XXXXXXXX_iOS_git"
"launchCommand" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git clone https:\/\/githubuserformacmini@github.com\/XXXXXXXX\/iOS.git
"launchPath" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git",
"GIT_ASKPASS" : "\/Applications\/Server.app\/Contents\/ServerRoot\/usr\/libexec\/xcs_ssh_auth_agent",
Jan 28 08:18:29 macmini.local xcsbuildd[80853]: Obtaining the HEAD hash at: /Library/Server/Xcode/Data/BotRuns/BotRun-187dbc1a-dae2-4ddc-a75b-75831de7ff09.bundle/tmp/https_github_com_XXXXXXXX_iOS_git
Jan 28 08:18:29 macmini.local xcsbuildd[80853]: [CSBotSCMAction gitHeadHashesRepositoryAtPath:branch:completionBlock:] : /Library/Server/Xcode/Data/BotRuns/BotRun-187dbc1a-dae2-4ddc-a75b-75831de7ff09.bundle/tmp/https_github_com_XXXXXXXX_iOS_git
Jan 28 08:18:29 macmini.local xcsbuildd[80853]: newRepoURL: file:///Library/Server/Xcode/Data/BotRuns/BotRun-187dbc1a-dae2-4ddc-a75b-75831de7ff09.bundle/tmp/https_github_com_XXXXXXXX_iOS_git/
"launchCommand" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git show-ref
"launchPath" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git",
"currentDirectoryPath" : "\/Library\/Server\/Xcode\/Data\/BotRuns\/BotRun-187dbc1a-dae2-4ddc-a75b-75831de7ff09.bundle\/tmp\/https_github_com_XXXXXXXX_iOS_git",
"launchCommand" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git checkout release",
"launchPath" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git",
"GIT_ASKPASS" : "\/Applications\/Server.app\/Contents\/ServerRoot\/usr\/libexec\/xcs_ssh_auth_agent",
"currentDirectoryPath" : "\/Library\/Server\/Xcode\/Data\/BotRuns\/BotRun-187dbc1a-dae2-4ddc-a75b-75831de7ff09.bundle\/tmp\/https_github_com_XXXXXXXX_iOS_git",
Jan 28 08:18:29 macmini.local xcsbuildd[80853]: [CSBotSCMAction gitHeadHashesRepositoryAtPath:branch:completionBlock:] : https://github.com/XXXXXXXX/iOS.git
Jan 28 08:18:29 macmini.local xcsbuildd[80853]: newRepoURL: https://github.com/XXXXXXXX/iOS.git
"https:\/\/githubuserformacmini@github.com\/XXXXXXXX\/iOS.git"
"launchCommand" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git ls-remote --heads https:\/\/githubuserformacmini@github.com\/XXXXXXXX\/iOS.git",
"launchPath" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git",
"GIT_ASKPASS" : "\/Applications\/Server.app\/Contents\/ServerRoot\/usr\/libexec\/xcs_ssh_auth_agent",
Jan 28 08:18:30 macmini.local xcsbuildd[80853]: [CSBotSCMAction gitCommitSummaryForRepositoryURL:betweenHashIdentifier:andHashIdentifier:completionBlock:] : /Library/Server/Xcode/Data/BotRuns/BotRun-187dbc1a-dae2-4ddc-a75b-75831de7ff09.bundle/tmp/https_github_com_XXXXXXXX_iOS_git
"launchCommand" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git log --no-color --name-status --format=fuller --date=iso e478616e4b3915846f7938fec24e8dc12cdae52a..f2c1b24a6b801ed9f7e60dce60add1851618da64",
"launchPath" : "\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/git",
"GIT_ASKPASS" : "\/Applications\/Server.app\/Contents\/ServerRoot\/usr\/libexec\/xcs_ssh_auth_agent",
"currentDirectoryPath" : "\/Library\/Server\/Xcode\/Data\/BotRuns\/BotRun-187dbc1a-dae2-4ddc-a75b-75831de7ff09.bundle\/tmp\/https_github_com_XXXXXXXX_iOS_git",
Jan 28 08:18:30 macmini.local xcsbuildd[80853]: [XCSCheckoutOperation.m:1033 7d02a310 +168ms] Error getting Git commit log in range e478616e4b3915846f7938fec24e8dc12cdae52a:f2c1b24a6b801ed9f7e60dce60add1851618da64 <stderr>= fatal: Invalid revision range e478616e4b3915846f7938fec24e8dc12cdae52a..f2c1b24a6b801ed9f7e60dce60add1851618da64
Jan 28 08:18:30 macmini.local xcsbuildd[80853]: [XCSCheckoutOperation.m:610 7d02a310 +0ms] Failed to get Git commit history for repo with error Error Domain=CSBotSCMAction Code=-1000 "fatal: Invalid revision range e478616e4b3915846f7938fec24e8dc12cdae52a..f2c1b24a6b801ed9f7e60dce60add1851618da64
I see...
git log --no-color --name-status --format=fuller --date=iso e478616e4b3915846f7938fec24e8dc12cdae52a..f2c1b24a6b801ed9f7e60dce60add1851618da64
... . e478616e4b3915846f7938fec24e8dc12cdae52a - , ( ), f2c1b24a6b801ed9f7e60dce60add1851618da64. , . /Library/Server/Xcode/Data/BotRuns, . , , /Library/Server/Xcode/Data/BotRuns/Latest, nope. /Library/Server/Xcode, .
, Xcode CI - git. . , - .