What happened Shares of Dollar General (NYSE: DG) jumped 22.1% over the first six months of 2020, according to data from S&P Global Market Intelligence, versus a 3% loss for the S&P 500 index. Considering that the deep discount retailer posted a gain of 44% across all of 2019, it would seem Dollar General was simply maintaining the pace of growth it had previously set. Image source: Dollar General. So what That might have been the case had not the world fallen apart in the first quarter due to the global coronavirus pandemic. Businesses were ordered closed, employees were furloughed, and stay-at-home orders became the norm. Even Dollar General's stock dipped from around $165 a share down to $125, a 24% decline. Yet it quickly became apparent that with millions of people out of work and the uncertainty of when there would be a return to normalcy, dollar stores like Dollar General were essential to consumers needing to stretch the limited amount of money they had available to them. Moreover, with the retailer expanding its assortment of consumables and fresh produce, it became an indispensable destination for consumers. Dollar General has actually gained over 50% from those initial dark days in March. Now what While Dollar General goes from strength to strength, the pandemic is masking the weaknesses of others. Struggling rival Dollar Tree (NASDAQ: DLTR), for example, gained 55% since its March lows, but its year-to-date performance is essentially breakeven. Dollar General has logged 30 consecutive years of comparable-store sales growth, and its first-quarter performance shows that that trajectory is intact, as comps grew 22% compared to a year ago. They were up another 22% over the first few weeks of the second quarter, indicating this retailer is a go-to business in good times and bad. 10 stocks we like better than Dollar GeneralWhen investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* David and Tom just revealed what they believe are the ten best stocks for investors to buy right now... and Dollar General wasn't one of them! That's right -- they think these 10 stocks are even better buys. See the 10 stocks *Stock Advisor returns as of June 2, 2020 Rich Duprey has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.Source