How do you maintain versions of UI code to serve to the user as you develop?
I am facing an issue where I want to serve certain users an older version of the UI but serve the newer UI to everyone else.
The problem comes when the code for both versions is radically different. The simplest solution seems to simply keep a copy of the old code alongside the new code and serve accordingly but this seems very messy, keeping versions of your old code and having to delete as you develop.
This also means you can't just develop on top of the old code; you have to make a copy and develop there. This will create really bad problems later with version control like Git where we can't see where the changes are since all the code is new.
Currently, whatever I develop in another branch in Git will override the old code in master after I merge and I can't build from the old code again unless I get the code from before that particular merge somehow.
Does anyone have any ideas on how to maintain code bases?