How to see which git branch the commit comes from (creating a release to production script)




  • Avatar
    Srikanth Seshadri

    Hi Erling,

    Take a look at these variables - let me know if it helps


    On a different note i will take your feedback about the branch name.





  • Avatar
    Erling Matthiesen Møller

    I still need a way to find which branch the GO_REVISION sha1 is comming from if I at some later point in time want to recreate that exact build. In our setup we sometimes need to point our GO CI pipeline to an experimental branch and then it becomes a pain to check out the specific commit in the release script that should check it out, tag it and push it to a master branch holding only the release tags.



  • Avatar
    Srinivas Upadhya

    Hi Erling,

    We assume that you will be doing these operations on agent & currently when agent checksout git repo we do not checkout the branch and hence you are not able to figure out which branch is the repo on.

    If that is the issue we have this in our backlog & we are planning to fix this. And we will keep you posted on the bug fix.

    Will this fix be enough for you to go ahead and do all the operations you mentioned? like find the repo URL, branch, revision. Tag it and push it on master? If not whatelse would you require to accomplish that?



Please sign in to leave a comment.