› Forums › Technical support › Jupyter Notebooks › Getting updated versions of the notebook repository from github
- This topic has 0 replies, 1 voice, and was last updated 3 years, 10 months ago by Catherine Lai.
-
AuthorPosts
-
-
September 25, 2020 at 16:34 #11995
We’ll continually update the notebooks and other materials in the uoe_speech_processing_course github repository:
https://github.com/laic/uoe_speech_processing_course
This will include content for future tutorials but also small text corrections.
However, if you’ve already run some of the notebooks interactively, you’ll want to backup your changes locally as pulling new versions of existing notebooks may overwrite your work.
The easiest way to do this is to:
- Rename and save the notebooks you have worked on.
- Go to your local uoe_speech_processing_course repository directory in the terminal
- run the following command:
$ git pull
This will download new versions of the notebooks (you could also do this using a git desktop GUI).
If you’re already comfortable with git you may want to try using more of its version control functionality and merge your changes with the new updates from the repository. One way to do this is by stashing your changes first.
- Go to your local uoe_speech_processing_course repository directory in the terminal
-
Stash your changes:
$ git stash
-
Pull the updated versions from github:
$ git pull
- Apply the changes you made previously
$ git stash apply
git will then try to merge the various changes.
If you see a message starting with “CONFLICT” you will need to resolve those by:
- opening the file flagged with the conflict in a text editor (e.g. vim, emacs, atom, etc)
- search for “>>>>>>”
- You should see the detected conflict marked between <<<<<<< and >>>>>>> for example:
<<<<<<< Updated upstream "for c in complex_nums:\n", " print(c)\n", ======= "for i, c in enumerate(complex_nums):\n", " print(i, c)\n", >>>>>>> Stashed changes
-
Delete the lines you don’t want to keep, along with the conflict markers:
“<<<<<<< Updated upstream”, “=======”, “>>>>>>> Stashed changes”
You should then be able to see new updates when you open that notebook in the browser. Here’s some brief tutorials on using git stash:
- https://code.tutsplus.com/tutorials/quick-tip-leveraging-the-power-of-git-stash–cms-22988
- https://www.w3docs.com/learn-git/git-stash.html
If you want an even more realistic software engineering experience, you can look at using branches and/or making your own fork of the repository.
-
-
AuthorPosts
- You must be logged in to reply to this topic.