yay -S gitchoco install git -y
brew install gitIrrespective of platform start a terminal and key in the following, each line concluded with a carriage return (enter, ↵), and substituting your own details for foo.
git config --global user.name "foo"
git config --global user.email "foo@foo.bar"
git config --list
Now git is ready for regular use.