Git missing after macOS Catalina install

Git missing after macOS Catalina install

On installing the macOS Catalina update, I realised that in Visual Studio Code Git is completely missing and cannot be added. The problem is apparently XCODE.  Instructions for updating are on StackOverflow. However, if in future that link disappears, then the answer...