In order to checkout a branch from slackbuilds at https://git.slackbuilds.org/slackbuilds/ first do:
git clone git://git.slackbuilds.org/slackbuilds.git
.
This will create a directory “slackbuilds”.
cd into that directory and checkout the branch you need.
cd slackbuilds
git checkout user/dive/qt5-5.12