I cloned a github repo using !git clone https://github.com/llSourcell/Pokemon_GAN.git. I wanted to modify a .py file inside Colab. So i used %load fil
!git clone https://github.com/llSourcell/Pokemon_GAN.git
%load fil
There is an app called Python Compiler Editor that you can connect to your Google Drive account, edit files and save them back.