Methods for using Git with Google Colab

前端 未结 12 815
臣服心动
臣服心动 2020-12-12 11:42

Are there any recommended methods to integrate git with colab?

For example, is it possible to work off code from google source repositories or the likes?

Nei

12条回答
  •  臣服心动
    2020-12-12 11:56

    I tried some of the methods here and they all worked well, but an issue I faced was, it became difficult to handle all the git commands and other related commands, for example version control with DVC, within notebook cells. So, I turned to this nice solution, Kora. It is a terminal emulator that can be run with in colab. This gives the ease of usage very similar to a terminal in local machine. The notebook will be still alive and we can edit files and cells as usual. Since this console is temporary, no information is exposed. GitHub login and other commands can be run as usual.

    Kora: https://pypi.org/project/kora/

    Usage:

    !pip install kora
    
    from kora import console
    console.start()
    

提交回复
热议问题