Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 4 characters in body
Source Link
David Buck
  • 3.9k
  • 40
  • 54
  • 73

You can also try this , had similar use case and this worked for me

git ls-remote --heads origin | grep $CI_COMMIT_SHORT_SHA | sed "s/.*///"

git ls-remote --heads origin | grep $CI_COMMIT_SHORT_SHA | sed "s/.*\///" 

Slightly different but taking inspiration from @ttfreeman's answer

You can also try this , had similar use case and this worked for me

git ls-remote --heads origin | grep $CI_COMMIT_SHORT_SHA | sed "s/.*///"

Slightly different but taking inspiration from @ttfreeman's answer

You can also try this , had similar use case and this worked for me

git ls-remote --heads origin | grep $CI_COMMIT_SHORT_SHA | sed "s/.*\///" 

Slightly different but taking inspiration from @ttfreeman's answer

Source Link
Swags
  • 31
  • 1

You can also try this , had similar use case and this worked for me

git ls-remote --heads origin | grep $CI_COMMIT_SHORT_SHA | sed "s/.*///"

Slightly different but taking inspiration from @ttfreeman's answer