-
Notifications
You must be signed in to change notification settings - Fork 128
Getting started with Git
If you are accessing dea-notebooks resources via the DEA Sandbox or National Computational Infrastructure and wish to save your work between sessions, you will need to either clone a copy of our default resources or download your work each session. This is required because changes made to Jupyter notebooks in the DEA Sandbox or NCI environment may be overwritten as part of regular automatic updating, meaning any changes you make may be lost.
To create a personal copy of the default notebooks, you will need to get started with Git - a version control system that supports collaboration on code-based projects by intelligently tracking changes in files.
Read more about GitHub and Git.
The guide 'Creating an account on GitHub' will help you to set up a free account on github.org which will allow you to create personal copies of DEA-notebooks resources and enable you to contribute your own code to the repository. To work with Git and the dea-notebooks repository, you can complete your Git-related actions directly in the github.com browser and via the command line in the DEA Sandbox and NCI environment. DEA Sandbox also has a Git API in the left hand workbench menu that simplifies many git tasks, eliminating most of the need to work on the command line.
To avoid losing your work between DEA Sandbox (or NCI) sessions, you will need to:
- Create a folder in the directory structure and
- Create a copy of the dea-notebooks into it (this is called creating a 'branch' of the dea-notebooks repository).
To do this inside the DEA Sandbox:
-
Ensure you are logged in to the DEA Sandbox
-
Open a new command-line terminal by clicking the blue "+" (New Launcher) button in the top-left corner to open the Launcher then click to open the Terminal. This is a Linux terminal for your Sandbox environment.
-
Navigate to your home directory by typing the following:
cd ~
-
Clone a copy of dea-notebooks 'develop' branch into a new folder called
dev
by typing the following:git clone --depth 1 --branch develop https://github.com/GeoscienceAustralia/dea-notebooks.git dev
-
Then, change into this folder as follows:
cd dev
-
Finally, create a new branch (copy) of the files with a name of your choice (replace 'your-branch' with a relevant branch name to you):
git checkout -b your-branch
You will now have a persistent version of the dea notebooks that will not be overwritten by automatic updates. Don't forget to regularly compare to the default notebooks to check for updates and changes. You can do this by manually comparing to the top level notebooks in your DEA Sandbox directory or you can explore Git options to do this. This Git cheatsheet can help you get started.
Updating this wiki: If you notice anything incorrect or out of date in this wiki, please feel free to make an edit!
License: All code in this repository is licensed under the Apache License, Version 2.0. Digital Earth Australia data is licensed under the Creative Commons by Attribution 4.0 license.
Contact: If you need assistance with any of the Jupyter Notebooks or Python code in this repository, please post a question on the Open Data Cube Discord chat or on the GIS Stack Exchange using the open-data-cube
tag (you can view previously asked questions here). If you would like to report an issue with any notebook, you can file one on Github.