xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun.

Most developers is experiencing the error after upgrading to Mac Os Sierra.
It affects all the command line developer tools including the git commands (git init, git push, git fetch ). Core reason for the same is when you update your Mac Os your commandline developer tools wont get automatically updated. It will be still in the old version which may not have support with other shipped tools with the new MacOsx version.

Solution:
Simply . update your xcode command line tools

Open Terminal, and run the following:

xcode-select –install

Hope this helps. Happy Coding!!!