# 2025-03 <br> SWD2: Version Control with Git/ GitHub
Welcome to the hack pad for SWD2 course from Research Computing at the University of Leeds!
You can edit this document using [Markdown syntax](https://guides.github.com/features/mastering-markdown/).
## Contents
1. [Links to resource](#Links-to-resources)
2. [Agenda](#Agenda)
3. [Pre workshop prep](#Pre-workshop-prep)
4. [What's your name and where do you come from?](#What’s-your-name-and-where-do-you-come-from)
5. [Code along](#Code-along)
## Links to resources
- **Contact Research Computing** - https://bit.ly/arc-help
- **Request HPC account** - https://leeds.service-now.com/it?id=sc_cat_item&sys_id=4c002dd70f235f00a82247ece1050ebc
- **Presentation for today** - https://arctraining.github.io/swd2_git/
- **GitHub** - https://github.com/
- **Using GitHub via the web interface** - https://github.com/YaleDHLab/lab-workshops/tree/master/intro-to-git
## Pre workshop prep
This workshop is a hands on workshop so you will be expected to do some typing today!
To help get you up to speed please do the following prep:
1. Register for an account with GitHub (we'd encourage with your University email) via https://github.com/join

2. Make sure you have access to a terminal/shell with git installed
- If you're using a Mac/Linux machine you're all set! (These come with a terminal and git installed already)
- If you're using Windows you'll need to do the following:
1. Install Anaconda, [click here to download the installer](https://repo.anaconda.com/archive/Anaconda3-2020.11-Windows-x86_64.exe) (watch this video guide - https://mymedia.leeds.ac.uk/Mediasite/Play/09302f838ced49af803054090c449b331d?autoStart=false)
2. Once installed open the Anaconda prompt

3. From the Anaconda prompt install git-bash using the command `conda install -c conda-forge git-bash==2.22.0` type `y` when prompted

4. Once installed successfully, type `git-bash` into Anaconda prompt

A new terminal should then appear

And you've successfully installed git-bash 🎉
5. To make it easier to start in the future pin it to your taskbar

**You're now all set for SWD2!**
## Agenda
| Time | Agenda |
| -------- | ------------------------------------------ |
| 1000 | Intro, setup, what is version control? |
| 1020 | Creating a repository, Tracking changes |
| 1100 | Break |
| 1110 | Exploring history, GitHub, collaboration |
| 1150 | Break |
| 1200 | Intro, collaborating (cont.), Conflicts |
| 1250 | Questions |
| 1300 | End of day 1 |
| Time | Agenda |
| -------- | ------------------------------------------ |
| 1000 | Conflicts and Branching |
| 1050 | Break |
| 1100 | Conflicts and Branching cont. |
| 1120 | Break |
| 1130 | Open Science, Licensing |
| 1220 | Break |
| 1230 | Open Science, Licensing |
| 1250 | Wrap up and questions |
| 1300 | Close |
## What's your name and where do you come from?
- Edit the hackpad and add your name!
### Code along
### Git Config
When we start using git it's helpful to set some defaults using the following commands:
```bash=
$ git config --global user.name "<your name>"
$ git config --global user.email "<your email>"
$ git config --global color.ui "auto"
$ git config --global init.defaultBranch main
$ git config --global core.editor "nano -w"
# if on windows
$ git config --global core.autocrlf true
```