hudson.plugins.git.GitException: Command "git rev-parse origin/master^{commit}" returned status code 128: stdout: origin/master^{commit} stderr: fatal: ambiguous argument 'origin/master^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'

GitHub | feliperoos | 5 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    ghprb fails to build after forced push to branch of a PR

    GitHub | 5 months ago | feliperoos
    hudson.plugins.git.GitException: Command "git rev-parse origin/master^{commit}" returned status code 128: stdout: origin/master^{commit} stderr: fatal: ambiguous argument 'origin/master^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'
  2. 0

    Accessing ${sourceBranch} and ${targetBranch}

    GitHub | 2 years ago | quiquepaz
    hudson.plugins.git.GitException: Command "git rev-parse origin/${targetBranch}^{commit}" returned status code 128: stdout: origin/${targetBranch}^{commit} stderr: fatal: ambiguous argument 'origin/${targetBranch}^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'
  3. 0

    GitHub comment 157#156978211

    GitHub | 1 year ago | joshuajorel
    hudson.plugins.git.GitException: Command "git rev-parse origin/$[gitlabTargetBranch}^{commit}" returned status code 128: stdout: origin/$[gitlabTargetBranch}^{commit} stderr: fatal: ambiguous argument 'origin/$[gitlabTargetBranch}^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I wanted to use the "automatic merging" functionality as described here: "Using Git, Jenkins and pre-build branch merging" ( https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-AdvancedFeatures ). I configured my job a described with the integration branch (Branch to merge to) configured to "developAutoMerge" and leaved the 'branch' field in the Git SCM blank. When I "Build now" I get following exception: Fetching changes from the remote Git repository Fetching upstream changes from git@REPOSITORY.git Seen branch in repository origin/develop Seen branch in repository origin/developAutoMerge Seen branch in repository origin/feature/blabla [...] Seen branch in repository origin/master Seen branch in repository origin/release/2.6.1 Seen branch in repository origin/release/2.6.2 Seen 13 remote branches Multiple candidate revisions Scheduling another build to catch up with blaServerBuild_developAutoMerge Merging Revision 6474f8ef91822e58edc55aad707d2725ff5a8431 (origin/feature/blabla) onto /developAutoMerge using resolve strategy FATAL: Command "git rev-parse /developAutoMerge^{commit}" returned status code 128: stdout: /developAutoMerge^{commit} stderr: fatal: ambiguous argument '/developAutoMerge^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions hudson.plugins.git.GitException: Command "git rev-parse /developAutoMerge^{commit}" returned status code 128: stdout: /developAutoMerge^{commit} stderr: fatal: ambiguous argument '/developAutoMerge^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1148) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1125) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1121) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:937) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:947) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:401) at hudson.plugins.git.GitAPI.revParse(GitAPI.java:257) at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:62) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:795) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:862) at hudson.model.AbstractProject.checkout(AbstractProject.java:1415) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561) at hudson.model.Run.execute(Run.java:1678) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) I found a similar problem by googling: https://groups.google.com/forum/#!topic/jenkinsci-dev/ek4hYR-z08k The proposed solution there was downgrading the Jenkins Git plugin from 2.0 to 1.4.0.

    Jenkins JIRA | 3 years ago | m r
    hudson.plugins.git.GitException: Command "git rev-parse /developAutoMerge^{commit}" returned status code 128: stdout: /developAutoMerge^{commit} stderr: fatal: ambiguous argument '/developAutoMerge^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions
  6. 0

    I wanted to use the "automatic merging" functionality as described here: "Using Git, Jenkins and pre-build branch merging" ( https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-AdvancedFeatures ). I configured my job a described with the integration branch (Branch to merge to) configured to "developAutoMerge" and leaved the 'branch' field in the Git SCM blank. When I "Build now" I get following exception: Fetching changes from the remote Git repository Fetching upstream changes from git@REPOSITORY.git Seen branch in repository origin/develop Seen branch in repository origin/developAutoMerge Seen branch in repository origin/feature/blabla [...] Seen branch in repository origin/master Seen branch in repository origin/release/2.6.1 Seen branch in repository origin/release/2.6.2 Seen 13 remote branches Multiple candidate revisions Scheduling another build to catch up with blaServerBuild_developAutoMerge Merging Revision 6474f8ef91822e58edc55aad707d2725ff5a8431 (origin/feature/blabla) onto /developAutoMerge using resolve strategy FATAL: Command "git rev-parse /developAutoMerge^{commit}" returned status code 128: stdout: /developAutoMerge^{commit} stderr: fatal: ambiguous argument '/developAutoMerge^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions hudson.plugins.git.GitException: Command "git rev-parse /developAutoMerge^{commit}" returned status code 128: stdout: /developAutoMerge^{commit} stderr: fatal: ambiguous argument '/developAutoMerge^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1148) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1125) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1121) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:937) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:947) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:401) at hudson.plugins.git.GitAPI.revParse(GitAPI.java:257) at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:62) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:795) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:862) at hudson.model.AbstractProject.checkout(AbstractProject.java:1415) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561) at hudson.model.Run.execute(Run.java:1678) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) I found a similar problem by googling: https://groups.google.com/forum/#!topic/jenkinsci-dev/ek4hYR-z08k The proposed solution there was downgrading the Jenkins Git plugin from 2.0 to 1.4.0.

    Jenkins JIRA | 3 years ago | m r
    hudson.plugins.git.GitException: Command "git rev-parse /developAutoMerge^{commit}" returned status code 128: stdout: /developAutoMerge^{commit} stderr: fatal: ambiguous argument '/developAutoMerge^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      Command "git rev-parse origin/master^{commit}" returned status code 128: stdout: origin/master^{commit} stderr: fatal: ambiguous argument 'origin/master^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn()
    2. org.jenkinsci.plugins
      CliGitAPIImpl.revParse
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1725)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1721)
      4. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1391)
      5. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1403)
      6. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:685)
      6 frames
    3. Hudson GIT plugin
      GitAPI.revParse
      1. hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
      1 frame
    4. hudson.plugins.git
      PreBuildMerge.decorateRevisionToBuild
      1. hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:64)
      1 frame
    5. Hudson GIT plugin
      GitSCM.checkout
      1. hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:994)
      2. hudson.plugins.git.GitSCM.checkout(GitSCM.java:1083)
      2 frames
    6. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.scm.SCM.checkout(SCM.java:495)
      2. hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
      3 frames
    7. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      1 frame
    8. Hudson
      Run.execute
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      2. hudson.model.Run.execute(Run.java:1720)
      2 frames
    9. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      1 frame
    10. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:98)
      2. hudson.model.Executor.run(Executor.java:404)
      2 frames