Save checkpoint from google colab to github repo

I am training a model on Google Colab and would like to save a checkpoint.pth file to the github repository from which I opened the notebook.
Is it possible?

in colab, I ran !git status and I see that git is available.

So technically, you can re-clone the repo inside your colab environment, using ! git clone [your repo URL], save your model to that repo, and then do your usual git add, git commit, git push etc.
I haven’t seen any automated way to do this.