Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on Git

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Git Tools

Access Token for Git

There are a few advantages of using (GitHub, etc.) access tokens for Git, especially in an enterprise environemnt.

  1. Access tokens can provided more fined access …

Hands on Dulwich

Note: dulwich is not feature complete yet and the development of the project is extremely slow. It is suggested that you use other Python packages instead. For more discussions, please refer to Git Implementations and Bindings in Python .

Tips and Traps

  1. The git command (and thus Dulwich) accepts URLs both with and without the trailing .git

Hands on GitPython

Tips and Traps

  1. GitPython is a wrapper around the git command. It requires the git command to be on the search path in order to work. Also, sometimes it is easier to call the git command via subprocess.run directly instead of using GitPython.

  2. The git command (and thus GitPython) accepts URLs both with and without the trailing .git

Use nbdime to Diff and Merge JupyterLab Notebooks

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

nbdime is a tool for diffing and merging of Jupyter notebooks. Notice that nbdime integrates with git well.

Tips and Traps

If you install nbdime to your local directory, make sure …

Git Large File Storage

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Installation

Please refer to git-lfs Installation for instructions on how to install git-lfs.

Tips and Traps

  1. Track a large file.

    git lfs track "*.pickle"
    
  2. It seems to be that git-lfs automatically …

Git Errors and Solutions

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

git clone throws the error message "fatal: unable to fork"

The reason is due to missing SSH.

The solution is simply to install openssh-client.

sudo apt-get install openssh

git pull throw …