Free Microsoft GH-200 Actual Exam Questions - Question 5 Discussion

Question No. 5
Which default environment variable specifies the branch or tag that triggered a workflow?
Select one option, then reveal solution.
US
SI
Shah I.
2026-02-17

It’s D for me. GITHUB_BRANCH sounds like it would specifically indicate the branch name that triggered the workflow. Since the question mentions branches or tags, the variable should reflect that context, and GITHUB_BRANCH could be the one focusing solely on branches. The others either don’t fit as well or seem less specific. I’m skipping A and C too because those don’t match known default variables. So I’d go with D since it directly names the branch, which is usually important in workflows triggered by branches or tags.

0
EL
Ethan L.
2026-02-17

B. GITHUB_REF is the one that holds the full ref path, like refs/heads/branch-name or refs/tags/tag-name, which fits the question about both branches and tags triggering a workflow. The others either don’t exist as standard vars or only refer to branches or tags separately. So B makes sense as the default environment variable for this.

0
RQ
Ravi Q.
2026-02-15

I’m ruling out C since ENV_BRANCH doesn’t sound like a default GitHub variable. Between A and B, B covers more cases by giving the full ref path, which might be what they want here. Could the question be testing knowledge of full ref versus just the tag?

0
RQ
Ravi Q.
2026-01-31

Maybe D is out since GITHUB_BRANCH isn’t a standard GitHub Actions variable. A and B are more official, but B covers both branches and tags through the full ref, so it feels more accurate overall.

0
JW
John W.
2026-01-26

I get why B is popular, but I’m going with A here. GITHUB_TAG specifically points to the tag that triggered the workflow, which fits if it’s a tag event. B includes branches and tags but with the full ref path, which might not be what the question’s asking for. D is definitely out since it’s not a real variable, and C seems made-up too. So for just the branch or tag that triggered it, A feels like the cleaner pick if they want the actual name rather than the full ref string.

0
KY
Karan Y.
2026-01-19

Option D doesn’t exist as a standard GitHub Actions variable, so it’s out. Between B and A, GITHUB_REF is the full ref name including branch or tag, so B fits best.

0
KY
Karan Y.
2026-01-16

B

0