Along the investing path, you'll come across great times such as bull markets, but you'll also stumble into tougher times such as market crashes. These moments -- the positive and the negative -- are all part of the investing story.

But the good news is, by investing over the long-term, the positive well outweighs the negative, and a look at the performance of the three major indexes over time is proof of that. After market crashes, they've all gone on to recover and gain. This means your portfolio can do the same -- especially if you make the right decisions at the time of a market crash.

Why think about this now? Because, today, during a market rally, you can calmly consider this idea of a crash and put a plan into place. To get started, here are three things you shouldn't do if the stock market crashes.

An investor works on her laptop in a home office.

Image source: Getty Images.

1. Don't sell growth stocks

It may be tempting to sell growth stocks when the stock market crashes because they are often the ones leading declines. Why is this the case? These are companies that depend on economic growth, consumer and investor confidence, and borrowing conditions since they often need to take on debt to grow. All of this makes them the first to suffer in a difficult environment.

When indexes touched bear territory last year, companies such as Amazon (AMZN -0.01%) and Tesla (TSLA -3.48%) sank, falling 49% and 65%, respectively, over the 12 months.

But here's why you should hang on to growth stocks during troubled times. In many cases, these companies may be suffering at the moment, but their long-term prospects remain bright. So, it would be a shame to give up on them -- and possibly lose on your investment -- when you could potentially gain by hanging on for a few more years.

Of course, there may be times when a growth company's prospects have changed, and selling is the right move. It's important to look at each stock individually. But if the long-term outlook remains intact, as is the case of market leaders Amazon and Tesla, you'll want to sit tight.

2. Don't overhaul your portfolio

Though you may not be in an investing mood during a crash, this actually is a great time to go bargain hunting and pick up some top stocks at a discount. That said, it's not a good idea to revamp your portfolio and change your investment strategy according to what's happening in the market.

For example, if you notice your favorites -- tech stocks -- are falling, and pharmaceutical stocks are rising, you may be temped to sell tech and jump on the pharma bandwagon. But it's a mistake to revamp your portfolio just to follow the trend, because at a certain point, the situation may change. And that would lead you to again swap in and out of stocks to follow the next trend. This is tiring, difficult, and won't necessarily lead to better performance.

Instead, it's best to stick with your strategy and stocks you believe in -- even through the tough times -- because over the long run, if you've chosen quality players, you're likely to win. And you won't have to go through the hassle of reworking your portfolio every time the market changes direction.

3. Don't forget about the long term

Finally, I'll talk about something that may make it easier for you to sleep nights during a market crash. Don't focus too much on the short term and panic as you see the day-to-day price movements of your favorite stocks. Remind yourself this is a temporary situation, and that, in the past, times like these always led to recovery down the road.

^SPX Chart

^SPX data by YCharts

As I mentioned above, the three major indexes have recovered and grown after crashes, and most quality stocks have done the same. Tell yourself that and resist checking your portfolio's performance on a daily basis.

Instead, focus on the idea that long-term investing involves holding on to a stock for at least five years. And in that time a lot can happen, including enormous stock market gains that could make today's market crash a distant memory.