Ben Chuanlong Du's Blog

It is never too late to learn.

Comparison of GitHub Tokens and Keys

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

Name Short Description Scope Permission Protocol
GitHub
SSH Key
A SSH public key All repos Read and Write SSH
GitHub
Deploy Key
A SSH public key Any repo
configures
the key …

Tips on Git Submodule

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

git submodule init
git submodule add git@github.com:dclong/docker_image_builder.git
git submodule update --recursive --remote

To remove a Git submodule.

git rm submodule

Module Already Exists in Index.

in …

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 …

Gitignore Examples

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

Tips and Traps

  1. You can ignore files in the root directory only by prefixing a pattern with /. For example, if you want to ignore the file features.txt in the root …