'How to specify github branch and revision in jenkins?

I have a Github repository: https://github.corp.com/appdev/myrepo;

the repository has multiple branches:
master
patch1

I need to pull revision id "123abc" from "patch1" into Jenkins to build.

How can I do it?

The GIT trigger in the SCM of Jenkins has text fields that seem to be related with branch specification:

Repository URL
Refspec
Branch Specifier (blank for 'any')

What if I want to build with a specific revision, not the HEAD?

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source