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
Not a perfect solution but can be useful for someone.
You can use !cat file_name.py to access file_name.py contents, copy the contents in the next cell and now you can run it or edit it.
!cat file_name.py
file_name.py