jenkinsci / jenkinsci/git-plugin

[JENKINS-20446] Git Plugin 2.0 has changed contents of GIT_BRANCH

Open
#2,357 15 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

I've configured a job to clone a repository and use the "develop" branch. With the 1.5 plugin, GIT_PLUGIN was set to "develop". After upgrading to 2.0, GIT_BRANCH is now set to "origin/develop", which breaks my scripts which were relying on the previous value.

---
Originally reported by davidschmitt, imported from: Git Plugin 2.0 has changed contents of GIT_BRANCH


  • status: Open
  • priority: Major
  • component(s): git-plugin
  • label(s): git
  • resolution: Unresolved
  • votes: 5
  • watchers: 10
  • imported: 2025-12-02

Raw content of original issue

I've configured a job to clone a repository and use the "develop" branch. With the 1.5 plugin, GIT_PLUGIN was set to "develop". After upgrading to 2.0, GIT_BRANCH is now set to "origin/develop", which breaks my scripts which were relying on the previous value.

  • environment: Jenkins 1.537; Git Plugin 2.0; Git Client Plugin 1.4.6; SCM API Plugin 0.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.