A refspec controls the remote refs to be retrieved and how they map to local refs. If left blank, it will default to fetching only the branch head that triggered the build. This default behaviour is OK for most cases.

When do you want to modify this value? A good example is when you want to fetch other branches to operate on them during the build. For example, +refs/heads/master:refs/remotes/origin/master would als retrieve the master branch in addition to the branch that triggered the build.

The plugin uses a default refspec for its initial fetch, unless the advanced clone Behaviour is set to honor refspec. This keeps compatibility with previous behavior, and allows the job definition to decide if the refspec should be honored on initial clone.

Multiple refspecs can be entered by separating them with a space character. +refs/heads/master:refs/remotes/origin/master +refs/heads/develop:refs/remotes/origin/develop retrieves the master branch and the develop branch in addition to the branch that triggered the build.

See the refspec definition in Git user manual for more details.