I clone my source using git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git w/. Then I specify a specific branch/tag by doing git checkout
git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git w/
git checkout
The current branch is marked with a * in the output of git branch. Example:
*
git branch
$ git branch branch1 * branch2 master