Practical Session 3
Working with git
Using git (locally)
Ok let's do this:
- on your laptop (or geniux) create a new directory
xyz
andcd
into it. - create a new notebook with a plot
- and bring this into version control using
git
:git init
git add notebook.ipynb
git commit -m "commit message"
- change the notebook - add another plot
- update the git repository:
git commit -a -m "updated a plot"
github.molgen.mpg.de
Using Do this:
-
Deposit RSA keys on the
github.molgen.mpg.de
webpage (-> Settings -> "SS and GPG keys" -> Add new SSH key) -
Test whether you can login without password:
ssh git@github.molgen.mpg.de
Schould run and greet you with your name.
-
Goto https://github.molgen.mpg.de/ and add a new repo. Give it a name, fill out the description, make it public, and create it:
-
On the next page you see commands how to "push" your local repo to github. Press the
SSH
button in the first blue box - and copy paste the commands in the third box on the command line. -
Reload the
github
page - now your notebook should be there. Open it and see whther all the plots are there.
Assignment 3
Please send a link to your github.molgen.mpg.de
repo such that I can admire your plots.