U can't memorize all variations anyway. There are 400 openings just in 1 move and something of order 20^(2k) in k moves. Even if U restrict yourself to main lines, it will take several years to roughly memorize them in Sicilian defense, for instance.
How Do We Study Openings?

"... I feel that the main reasons to buy an opening book are to give a good overview of the opening, and to explain general plans and ideas. ..." - GM John Nunn (2006)
"The way I suggest you study this book is to play through the main games once, relatively quickly, and then start playing the variation in actual games. Playing an opening in real games is of vital importance - without this kind of live practice it is impossible to get a 'feel' for the kind of game it leads to. There is time enough later for involvement with the details, after playing your games it is good to look up the line." - GM Nigel Davies (2005)
"... Review each of your games, identifying opening (and other) mistakes with the goal of not repeatedly making the same mistake. ... It is especially critical not to continually fall into opening traps – or even lines that result in difficult positions ..." - NM Dan Heisman (2007)
https://web.archive.org/web/20140627062646/http://www.chesscafe.com/text/heisman81.pdf
In this way, to a large extent, your games guide what you learn.

1)Your chess study time would be better spent doing less openings according to the relative strength of your openings to the rest of your game. Knowledge up to the 12th move in your whole repertoire would correspond to a 2200+ level in the rest of your game.
2) 5th move is probably enough for your level.
3)Most people get depressed from playing the same opening over and over again. Furthermore, if your openings are predictable, the value in it dies overnight due to computers (for top pros). Thus, it is generally more effective to exploit the versatility of knowing several openings pretty well (up to 12-15 moves) than to know a few openings very well (20ish moves).
I’m kind of a noob at this topic, but here are my thoughts on the subject.
One should focus on trending lines since they are more likely to come up.
One should focus on studying sharp lines since there is more to gain and more to lose in them than in solid lines.
Questions remain: How to determine which lines are trending? How to take notes on an opening? Which databases, informants, magazines or books, should be used?

mini_Van closed his account May 20 (2 days ago as this is posted and 1 day after his original post) . . .
"... Overall, I would advise most players to stick to a fairly limited range of openings, and not to worry about learning too much by heart. ..." - FM Steve Giddins (2008)
"... the average player only needs to know a limited amount about the openings he plays. Providing he understands the main aims of the opening, a few typical plans and a handful of basic variations, that is enough. ..." - FM Steve Giddins (2008)

The advice from everyone thus far is extremely beneficial here. If you really must study openings, the best is to first learn the key ideas/patterns/themes/structures and so on that this given opening tends to lead towards. You can memorize "important" lines, but knowing vaguely the key ideas helps you to find the better moves - memorized or not. Of course, I'd save the intense line memorization and opening study until at least 1800 rating or so (maybe even higher, like 2000); time could be better spent studying endgames or tactics.
Memorization of "important" lines comes from study and practice, but study alone will not be enough. There are far too many lines to retain in your mind. Chess has approximately 10 to the 43rd power legal positions (Shannon number, named after mathematician Claude Shannon who calculated this). This number is greater than the number of atoms in the known universe! The complexity of chess should be navigated via patterns, themes, intuitions and so forth because memorization alone is not realistic.


Dear friends,
I have a few questions on studying openings
1. I read one opening book and see that some lines are up to move 12th, which make me feel like it is a cookbook. Do I really memorize those lines or must I understand the main ideas of behind each variation.
2. If we understand the main ideas, then, should I just memorize all variations up to the fifth move then play the game my own way?
3. If each line prepared is well-thought by the author (IM, GM) then why does each author have their own repertoire? Does it mean that the strength of each GM is based on how well they prepare their opening lines?
Sincerely
mini_VAN
mini_VAN closed their own account on May 20, 2018
Dear friends,
I have a few questions on studying openings
1. I read one opening book and see that some lines are up to move 12th, which make me feel like it is a cookbook. Do I really memorize those lines or must I understand the main ideas of behind each variation.
2. If we understand the main ideas, then, should I just memorize all variations up to the fifth move then play the game my own way?
3. If each line prepared is well-thought by the author (IM, GM) then why does each author have their own repertoire? Does it mean that the strength of each GM is based on how well they prepare their opening lines?
Sincerely