Up until the 1870s breweries were local entities, not unlike dairies and bread bakers are today. Anheuser-Busch was the first brewery to pasteurize their beer and use refrigerated rail cars to establish a national brand. They were to beer what Gustavus Swift was to meatpacking. The history of national brands really goes hand in hand with that of advertising and there were all kinds of restrictions on ads to make the printed copy appear no more conspicuous than the articles. This starts to evolve after the civil war.
It seems like most brands of any type of product were strictly local/regional with the restrictions on print ads in England carrying over to the states. It looks like Yuengling was a regional brewery that also owned the James River Steam Brewing company. James River was owned by the son Yuenling's founder and would have been available to your soldiers at Gettysburg. Prior to refrigeration though you get unrefrigerated steam beers and ales that can be made all year and seasonal lagers that need to be fermented at a lower temperature. Meaning the ability to create consistent beers year round was difficult, lending necessity to a more commodified product. A company would have a number of beers that were made in styles that lent themselves to the fermentibles and climate of the season and the region.
German lager needs a cold and consistent temperature. Ale is less delicate in the fermentation process. A bitter/hoppier ale can stand up to unusual flavors that might develop from heat for example which is why the English had India Pale Ale for the long voyage to bring beer to the expats on the subcontinent. Steam beers were essentially a hack of the process that allowed for the use of lager yeast at higher temperatures. In many ways these steam beers were and attempt to make a crisper more consistent lager beer year round. Ironic that it would be one of the beers available in Virginia, the only other notable steam brewery was Anchor in San Francisco.
Ironic too that Civil War veterans like Adolphus Busch would come back from the war to develop a national brand. Prior to this you get a product that was less likely to draw attention just for the beer itself. Before the Civil War it was very hard to do quality control too because kegs were the main way beer could be distributed. Meaning that they had little to no control over how a beer would be sold so that the beer of one brand could be switched out and offered under the name of another company. This led to bottle beer and vertical integration (breweries owning the network of taverns that sold their beer), all of which come after the Civil War. Circling back around to the British their first registered trademark is the red triangle of Bass Ale and that was introduced in, 1870. So while Lowenbrau and Stella Artois claim to have been registered in the 15th century, the trend of offering a distinct "brand" doesn't seem to really kick into gear until after the American Civil War.
Meaning that while the soldiers at Gettysburg were likely able to get themselves a beer brewed by a Yuengling it was unlikely that they took much interest in that fact. But like there is the chance there was some breakout possibility for beer, like we see with Tillamook or Wonder in the dairy and baking industry respectively, most often the beer, milk or bread you were offered was consumed without any special regard for who made it.
Follow up question. Of the brand's that have survived, how much have the beers changed from their original recipe?
You may have more luck with the specialized historians of https://www.reddit.com/r/AskFoodHistorians/
A follow up question, how did breweries/distilleries survive prohibition? I know Yuengling sold ice cream (and still does), but I wonder how others that did not already have a dairy in place get through a few years of closing the doors?
Follow up question: in Django Unchained, Christopher Waltz's character pours a couple of cold pints into frosted glasses after shooting the outlaw deputy. Is it realistic that they would have been able to somehow refrigerate the beer and enjoy it ice cold?