Two ways
- create a branch in your working directory with the same name as the remote branch you want to pull, for Frappe and ERPNext version 12 is on the version-12 branch so a
Git fetch upstream version-12 should work, remember to merge after fetching - To migrate to a specific tag you can just checkout to the specific tag directly use this link for reference Installing a specific version of Frappe/ERPNext