Skip to content

2.2 Using git on byrd

Naomi Henderson edited this page Apr 9, 2018 · 10 revisions

Using git for version control on your notebooks

How to use git for tracking changes on your notebooks

0. preliminaries: configure git in a terminal

(you can change your choices later)

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

1. initialize your repository (type line by line in terminal)

  cd ~/notebooks
  git init
  git add *.ipynb
  git status
  git commit -m "some initial msg"
  git status

2. make a new notebook (remember how to do this?)

3. and add ('stage') and 'commit' the new notebook

  git add NewNotebook.ipynb    # stage the new file
  git status
  git commit -m "added NewNotebook" # commit the new file
  git status

4. add a cell to your new notebook and commit changes

  git status
  git commit -m "added a new cell to NewNotebook"
  git status

5. go to a proper tutorial or reference to learn more ...

Clone this wiki locally