- Download the CM 12 Nightly Android 5.x Lollipop ROM from here. – this ROM can be updated with new builds using the CyanogenMod Updates menu under Settings> - About Phone menu.
- Download Gapps for Android 5.x ROMs here.
- Connect your phone to your PC and copy both zip files. – do not unzip the files. – disconnect the device from PC after the files are copied.
- Power off the phone and then boot it in Custom Recovery Mode.
- Create the NANDROID Backup ROM for your Optimus G: – for CWM select ‘backup and restore’. – for TWRP select ‘backup’ option. – set a name for the file and confirm process.
- Apply the factory reset: – CWM: select ‘wipe data/ factory reset’. – TWRP: press Wipe option.
- Start the installation process of CM 12 Nightly ROM for your Optimus G: – CWM: select ‘install zip from sdcard’, then ‘choose zip from sdcard’. – TWRP: press Install.
- Find the CM 12 Nightly ROM zip and confirm its installation.
- When the CyanogenMod 12 Nightly is installed you can flash the Gapps zip in the same way.
- Reboot your phone in normal mode. – note that the first boot process of your device takes a while before it loads all the new files.
- Use your usual Google account info or create a new CyanogenMod profile in order to take control over your device once again.--
Ref: android.gs/update-lg-optimus-g-to-android-5-0-lollipop-with-cyanogenmod-12-nightly-official-rom-builds/