javascript – How to deal with minification

Sorry for such a noob question, I just started learning web development. But I am confuse on how do you handle minification on JS and CSS.

For example you minify your JS, CSS files for release but where do you keep the unminified version of the codebase? Because apparently you only have to release the minified versions of the copy.

Should you have two codebase? Simply because having the minified version only is not something you can work on when debuggging.

And I think having two codebase for the same project is a disaster because you now have to keep everything in sync.