If i'm with a companion and use TGM for god mode, does he/she will be invicible too, or no? Is there a way to make my companions invicible?
No, they won't be invicinble with god mode. What you can do is click on them as to start a conversation and use
forceav health 9999999 to increase their health. This should probably give you an invincible effect.
You can also make companions essential through the console command
setessential base_id 1. Switch base_id with the code you can find in the wiki pages (eg. Boone's base id is 00092bd2)