Search code examples
google-colaboratory

Git pull on Google Colab


I'd like to ask, if there's possibility to pull latest changes from git using Google Colab? Most answers are referring to git clone as the beginning of the project, but I made some minor changes and I'd like just to pull on Google Colab. Every time I get error about missing init content.

How can I pull latest changes from my git in Google Colab?


Solution

  • Make sure to be in correct folder first - by default if you just type git pull it'll try to do it on root folder. First move to correct folder, where you repo was cloned and then run pull request:

    %cd /content/repo_folder
    !git pull