“The Fifth Man” is episode four of season five of Stargate SG-1.
SG-1 are under fire by Jaffa. O’Neill and an injured new team member, Lieutenant Tyler (who has never been seen before), are cut off from the rest of the team, who return to the SGC through the gate. When they arrive and state the situation, no-one else has any idea who Tyler is, and have never heard of him (there is a reason why he had never been seen before now). General Hammond refuses to let them return through the gate, and orders them to report to the infirmary.
The rest of the team theorise that they may have somehow ended up in another reality, one where Tyler doesn’t work at the SGC (not as far-fetched as it might sound; different realities have been encountered before, starting in “There But for the Grace of God”), but a search of the database doesn’t reveal Tyler – but it does reveal that someone outside the base has been snooping through SG-1’s files.