Set up GitHub#
General workflow#
Setting up GitHub#
We assume that any contributor has a Github account and established a secure connection using the GITHUB_TOKEN or SSH. If you wish to set up a new account or want to know how to set up a secure connection before contributing, please see here: Getting started with Github.
Instructions for first-time GitHub users
If this is the first time you clone a GitHub repository, it’s very likely that you will need a personal access token as your password.
Option 1 - Check out this page: creating a personal access token for how to create a personal access token, and use it as your password when you are asked to enter it in the terminal.
Option 2 - Alternatively, set up SSH key and upload your public key to your GitHub account. Follow instructions in this page: Generating a new SSH key and adding it to the ssh-agent for how to set up SSH keys with GitHub.
Fork and clone#
Navigate to the GitHub repository
Click the “Fork” button on top right of the page (followed by a confirmation page with a “Create fork” button)
Now you will be redirected to your own fork of Espresso, where you can freely commit changes and add your code.
%%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'showCommitLabel': false}} }%% gitGraph commit commit branch your_own_fork checkout your_own_fork commit commit checkout main merge your_own_fork commit commitNext, create a local copy of your fork of the Espresso repository using “clone” (the Github equivalent of download):
$ git clone https://github.com/YOUR_GITHUB_ACCOUNT/espresso.git $ git remote add upstream https://github.com/inlab-geo/espresso.git $ git fetch upstream
replacing YOUR_GITHUB_ACCOUNT with your own account.
Open your local copy (folder
espresso
) using your favourite editor (VSCode, Spyder, etc.). Continue with setting up development environment.