If you’ve ever wanted to open a .gitignore file in the jupyterlab IDE, (unless you mainly work in command line text editors) you’ve probably noticed that jupyterlab doesn’t serve .gitignore, or any other hidden files (which are prefixed with a .) by default. When I initially ran into this issue, I assumed it would just be a matter of changing a setting in the setting menu, but I couldn’t find any relevant options in Settings » Advanced Settings Editor. Google took me to jupyterlab issue 2049 from April 17, 2017, but none of the responses got me all the way to a solution (and this issue is still open as of Aug 13, 2021). This might be push you need to finally cross learn vim off of your ToDo list, but if that’s a bridge too far, you can use the steps below.

The Steps

hidden files shown

  1. Activate an environment with jupyter-core installed (you should have it if you can start a jupyterlab or notebook server),
  2. Generate a jupyter config file
    • $ jupyter notebook --generate-config
  3. Open up the generated file (named jupyter_notebook_config.py, typically in ~/.jupyter)
    • $ cd ~/.jupyter && nano jupyter_notebook_config.py
  4. Go down to the ContentsManager section to the commented line #c.ContentsManager.allow_hidden = False, uncomment the line, change False to True, and save the file
  5. Restart your jupyter server.

Now jupyterlab will serve hidden files and you’ll be able access them easily through the File Browser.

hidden files shown