This page is used in conjunction with training sessions about GitHub.
Preparation
Sign up (or in) at https://github.com/
Exercise 1: Create and edit a Github repository
1. Create a new repository
- Click "New"
- Give your repository a name, leave it public and add a README file
- Click "Create repository"
2. Commit changes
- Under "Code" click the edit button of README.md
- Add something (to add style use Markdown - here is the cheat sheet)
- Click "Commit changes..."
- Add a title and brief description about your changes in the Commit message (like "added content")
- Click "Commit changes"
3. Use branches to commit changes
3.1 Create a branch
- click on the dropdown button that says "main"
- give your new branch a name
- click "Create branch ... from main"
3.2 Add more content
Work inside your new branch to add more content to the README.md (hit the edit symbol)
Click "Commit changes...", include a brief Commit message and confirm by clicking "Commit changes"
3.3 Pull request and merging of changes (back into the main branch)
- Click "Pull requests"
- Click "Compare & pull request"
- Click "Create pull request"
- Click "Merge pull request" and confirm
Exercise 2 : Use GitHub Pages to create a website
- Click "Settings" and navigate to "Pages"
- Choose your "main" from the dropdown in the Branch section and save
- Be patient for the publishing to take effect (can be a minute or two)
- VIew your published website (click "Visit site" under Pages once available)
Exercise 3: Contribute to a GitHub repository
3.1 Fork an existing repository
- Use the search box to locate "arminstraube/Conul2023" and click on it
- Use the dropdown titled "Fork" and click "create a new fork", leave everything as is and confirm by clicking "Create fork"
3.2 Propose changes via pull requests as in the exercise above
You can propose changes to index.md or to an existing blog post like 2023-05-25-welcome.md in the folder _posts
3.3 Creating a new blog post:
- go into the folder _posts
- Use the dropdown "Add file" and click "Create new file"
- your file name should have the structure 2023-05-25-put-a-title-here.md
- Add content to your entry
The first 4 lines should look like this:
---
title: "your title here"
date: 2023-05-25
---
- Commit your changes and send a pull request
Open Educational Resources: a website linking many GitHub repositories
Website: https://librarycarpentry.org/lessons/
Open Educational Resources: A cloned and customized Library Carpentry course
Resource: https://arminstraube.github.io/Python-Introduction/
GitHub: https://github.com/arminstraube/Python-Introduction
Original: https://librarycarpentry.org/lc-python-intro/
An OA journal
Website: https://joss.theoj.org/
GitHub: https://github.com/openjournals/joss
A Handbook on GitBook : FAIR Training handbook
GitBook: https://fairsfair.gitbook.io/fair-teaching-handbook/
GitHub: https://github.com/FAIRsFAIR/FAIRteachinghandbook
A Handbook inviting participation: FAIR Cookbook
Website: https://faircookbook.elixir-europe.org/content/home.html
GitHub provides self-administered courses: https://skills.github.com
A quick guide to Markdown: https://www.markdownguide.org/cheat-sheet/