In order to ensure the contents of your notebooks/tutorial-notebooks/
directory are up to date, you have several options, but they all start with checking that you have your git user and email set up.
You can check this with :
egrep 'email|name' ~/.gitconfig
If you get nothing back the email and name have not been set. Set them with:
git config --global user.email yourEmail@yourdomain
git config --global user.name GItUsername
This will allow you to use the options below.
Option 1. Fully log out, stop the server, and log back in again. This will automatically refresh the contents of your notebooks/tutorial-notebooks/
directory. To fully stop your server, use the control panel at https://data.lsst.cloud/nb/hub/home. Click the red button that says “Stop My Server”.
Option 2. However, you will not have the most up-to-date versions of all the notebooks if you have made and saved changes to any of the notebooks (recall that Jupyter auto-saves changes, so just executing the notebook will save a changed version). In other words, git
will not overwrite your changes to these notebooks. Use git status
from a terminal command line in the notebooks/tutorial-notebooks/
directory to see if any files have changed.
If you are in this situation, use the documented the solutions in this GitHub Issue thread to use git restore
.
Option 3. As a last resort, to completely blow away any changes you’ve made and get a fresh set of all of the tutorial notebooks, use the following in the notebooks/tutorial-notebooks/
directory:
git reset --hard origin/main
git pull
Using git
is the preferred way to make your tutorial-notebooks/
directory completely refreshed with the most up-to-date versions of the tutorials. However, a final last resort is to delete the entire tutorial-notebooks
directory, log out and stop the server (see instructions above), and then log back in again.