"error: unable to read SDK settings"

After I upgraded my MacBook to macOS Mojave, for every command executed in my Terminal I got error message like this:

git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX10.12.sdk'
git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX10.12.sdk'
git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

CommandLineTools was outdated, reinstalling Command Line Tools fixed the issue:

xcode-select --install