### Navigation

- index
- modules |
- next |
- previous |
- Developer's Guide v6.4.1 »

# Sage Notebook Developer Guide

Development of the Sage notebook currently occurs on Github using the Git revision control system. The development model for the Sage Notebook project is a git and github workflow.

To update to the latest development source, run the commands below, where `SAGE_ROOT` is the root directory of the Sage installation, and where `hackdir` is a directory you create for working on code changes (it need not have the name or location given below).

Warning

This will create a new sagenb repository ignoring any changes you have made to the files.

    mkdir ~/hackdir
    cd ~/hackdir
    git clone git://github.com/sagemath/sagenb.git sagenb-git
    cd SAGE_ROOT/devel
    rm sagenb
    ln -s ~/hackdir/sagenb sagenb
    cd sagenb
    ../../sage setup.py develop

What this has done is to create a new directory, move to that directory, and create a clone of the most up-to-date version of the upstream notebook sources there. Then we remove a symbolic link `sagenb` in the Sage folder and replace it with a link to your clone of upstream, finally making sure that the notebook has the correct dependencies.

An advantage of having the separate directory for sagenb is that you would later be able to keep it and do development work in it even when you upgrade Sage, or even if you accidentally destroy your Sage installation somehow.

The rest of these instructions is some very generic documentation, slightly adapted to help develop the notebook using Git and Github.

The most important section involves how to update your new sagenb source repository and create a “fork” of the master copy, so that you will be able to request your changes to be merged in the Sage notebook, called a “pull request”; see Git for Development.

- Following the Latest Source
  - Get the Local Copy of the Code
  - Updating the Code
- Making a Patch
  - Making Patches
  - Moving from Patching to Development
- Git for Development
  - Making Your Own Copy (Fork) of Sage Notebook
  - Set Up Your Fork
  - Development Workflow
  - Maintainer Workflow

### Navigation

- index
- modules |
- next |
- previous |
- Developer's Guide v6.4.1 »