Usually that message means that one or more of the names that you referenced in the 'git log' command is not defined in the workspace where the job is running. For example, a Jenkins workspace checkout as created by the git plugin ny has no named branches. It uses a "detached HEAD" rather than a branch name checkout by default. If you want to checkout with a named branch, you need to enable the '
You can check that case in the workspace with the command: $ git branch It will probably show that either there is no branch named "master" in that workspace or no branch named "hotfix/SFCC.1.11.0". On Thu, Sep 5, 2019 at 1:31 AM SandeepM <sandeep.muty...@gmail.com> wrote: > git log master..hotfix/SFCC.1.11.0 --oneline | tail -1 > > ERROR: > fatal: ambiguous argument 'master..hotfix/SFCC.1.11.0': unknown revision > or path not in the working tree. > Use '--' to separate paths from revisions, like this: > 'git <command> [<revision>...] -- [<file>...]' > > When I executed above command through CLI it working fine. But when I have > Executed command in jenkins execute shell am getting above error. > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/089bb2c9-3426-4b0c-a175-ecaa52a7bfd0%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/089bb2c9-3426-4b0c-a175-ecaa52a7bfd0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Thanks! Mark Waite -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEY9mKOCgTjpDGdUXNTiXr-_jvq-jU5_a08b41rR%2BvLSQ%40mail.gmail.com.