# 2021-03-30 <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) ## 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 ![](https://i.imgur.com/OGYbh5E.png) 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 ![](https://i.imgur.com/ftYIKMo.png) 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 ![](https://i.imgur.com/eQlY7ZW.png) 4. Once installed successfully, type `git-bash` into Anaconda prompt ![](https://i.imgur.com/nnrLgtG.png) A new terminal should then appear ![](https://i.imgur.com/e1AKqRd.png) And you've successfully installed git-bash 🎉 5. To make it easier to start in the future pin it to your taskbar ![](https://i.imgur.com/DrIPkWw.png) **You're now all set for SWD2!** ## Agenda | Time | Agenda | | -------- | ------------------------------------------ | | 0900 | Intro, setup, what is version control? | | 0950 | Break | | 1000 | Configuring git, creating a repositories | | 1050 | Break | | 1100 | The commit cycle, exploring history | | 1150 | Break | | 1200 | Adding in GitHub | | 1230 | Close | ## What's your name and where do you come from? - Alex Coleman, research software engineer in Research computing - Patricia Ternes, Researcher in Simulating Urban Systems at the School of Geography. - John Hodrien, Research Software Engineer - Ramona Behravan post-doc in design and AI - Macauley Locke, PhD student Mathematical Biology - Josefa SepĂșlveda, PhD student - Khatun E Zannat, Post graduate researcher, ITS - Michele Di Lecce, PhD Student School of Electronic and Electrical Engineering - Niall Gallop Research Technician, LICAP - Andrea De Santis, Research Fellow, School of Chemical and Process Engineering - CFD developer - Tom Dally, postdoc, School of Biology - MoisĂ©s Rojas Rechy, PhD Biological Sciences (Structural Virology) - Eve Shalom, PhD Student, School of Physics and Astronomy, working on CFD in biological tissues - Gise TomĂ© Lourido, Lecturer in Linguistics and Phonetics. - David Klebl, PhD student in biomedical sciences, mostly image processing for cryo-EM - Sam Llanwarne, PhD Computer Science and Medicine - Oliver Bramley, PhD student in chemistry, model quantum systems and electronic structure - Cordula Wittekind, PhD student in geography, hydrological modelling - Lucy Godson, PhD student school of computing - Cedrick O'Shaughnessy, Postdoctoral fellow @ School of Chemistry. - Catherine Hogg, MSc student Precision Medicine - Caroline Tait, PhD Geography - Sijia Li, PhD Statistics - Muyang Zhang, PhD,Statistics - Sam Haysom, PhD Structural Biology - Shenghao Qiu, PhD student, School of Computing - Nazia Ahmed, PhD Computational Biology - Shradhanjali Sahu, PhD student, Electronic and Electrical Engineering ### 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 ```