Git pull request explained
How to make pull requests (the easy way)
Set-up git on Jupyter hub and link your fork:
visit https://github.com/NordicESMhub/NEGI-Abisko-2019
- fork the master branch to your github account
- https://github.com/USERNAME/NordicESMhub/NEGI-Abisko-2019
go to Jupyterhub
- open terminal
- set up your github account with your USERNAME
$ git config --global user.name "USERNAME"
- clone fork from your Github account https://github.com/USERNAME/NEGI-Abisko-2019
$ git clone https://github.com/USERNAME/NEGI-Abisko-2019.git NEGI-Abisko-2019-fork
- change to your fork on Jupyter hub
$ cd NEGI-Abisko-2019-fork
- Link your fork (=https://github.com/USERNAME/NEGI-Abisko-2019-fork) to NordicESMHub repository (=https://github.com/NordicESMHub/NEGI-Abisko-2019.git)
$ git remote add upstream https://github.com/NordicESMHub/NEGI-Abisko-2019.git
Steps to do everytime you want to push your file to https://github.com/NordicESMhub/NEGI-Abisko-2019
6. update your fork (=https://github.com/USERNAME/NEGI-Abisko-2019-fork) and push to NEGI-Abisko-2019 master (=https://github.com/NordicESMhub/NEGI-Abisko-2019)
$ cd NEGI-Abisko-2019-fork
$ git pull upstream master
6.1 side note: you might encounter a merge conflict. $\rightarrow$ a window will pop up (it's blue).
- F10 $\rightarrow$ hop into File
- choose Save
- F10 again
- choose Exit
$ git checkout -b NEWBRANCHNAME
$ git add content/topics/group-2/USERNAME_filename.ipynb
$ git commit -m 'describtive text about the changes/adjustments you made to USERNAME_filename.ipynb'
$ git push -u origin NEWBRANCHNAME
7. visit your github fork: https://USERNAME/NEGI-Abisko-2019
create pull request
:~/NEGI-Abisko-2019-fork$
$ git checkout master
$ git pull upstream master
$ git push origin master
Note: repeat steps 8. to 9. everytime you want to contribute to https://github.com/NordicESMhub/NEGI-Abisko-2019