Search
Git pull request explained

How to make pull requests (the easy way)

  1. visit https://github.com/NordicESMhub/NEGI-Abisko-2019

  2. go to Jupyterhub

    • open terminal

    • set up your github account with your USERNAME
$ git config --global user.name "USERNAME"
  1. 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
  1. change to your fork on Jupyter hub
$ cd NEGI-Abisko-2019-fork
$ 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

$ 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

8. go back to the jupyter hub terminal you should still be in

:~/NEGI-Abisko-2019-fork$

9. update master branch

$ 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