Open Terminal and execute the ff:
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
git config --global core.editor "sublime -n -w"
references: https://help.github.com/en/articles/associating-text-editors-with-git