-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathintro-to-git-presentation.qmd
More file actions
102 lines (69 loc) · 3.44 KB
/
intro-to-git-presentation.qmd
File metadata and controls
102 lines (69 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
title: "Introduction to Git"
author: "Nathan Green"
format:
revealjs:
slide-number: true
---
## Workshop Overview
- Introduction to Version Control (today!)
- Basic Git Workflow
- Branching and Merging
- Collaboration on shared folder or GitHub
- Best Practices
Session contains short presentations, live demos, and hands-on tasks
## Training material
- Clone the repository:
- Either download the zip from GitHub by clicking on the `<> Code` button
- Or use the terminal
``` sh
git clone https://github.com/ICON-in-R/git-and-github-training.git
cd git-and-github-training
```
## Introduction to Git
Git is a **version control system**, like a powerful "save button" for your files and directories. It helps you track changes and keep a history of your project.
 
::: {.notes}
most popular
different version of CV eg
laptop, PC, work, home
can view all the changes with previous versions
:::
------------------------------------------------------------------------
## Git vs. a Text Editor 📝
A text editor saves the entire file at once, giving you only one record unless you make manual copies (e.g., `draft1.doc`, `draft2.doc`).
Git, on the other hand, records the *differences* in files and folders and keeps a historical record of every save. This is a game-changer for developers!

------------------------------------------------------------------------
## Why is Git Useful? 🤔
### For Individuals:
- Review how your project grows over time.
- Easily look at or restore file states from the past.
### For Teams:
- Share and collaborate on projects with other developers.
- Push your project to platforms like **GitHub**, Bitbucket, or GitLab.
------------------------------------------------------------------------
## Git + GitHub = ❤️
- **Git** works on your **local** machine.
- **GitHub** is a **remote** storage facility on the web for your coding projects.
- You can have private repos and manage access
- Local interface with [GitHub Desktop](https://desktop.github.com/download/)
------------------------------------------------------------------------
## Example Workflow

::: {.notes}
_working directory_ is where make changes to files - not tracked yet
_staging area_ is where prep changes before committing them - draft space
_local repository_ is project history stored on your computer
_remote repo_ is shared version of the project hosted on the internet or network
_branches_ parallel versions of project
_pull request_ is way to propose changes - review, discuss, merge
:::
## Assignment and Resources 💻
- Read chapters 1.1 through 1.4 from the **Getting Started** section of [Pro Git](https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control)
- If you haven’t yet, [install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- NB macOS should have git pre-installed
- [Short History for Git and Github](youtube.com/watch?v=1h9_cB9mPT8&list=PLqGj3iMvMa4LFz8DZ0t-89twnelpT4Ilw&index=1)
- [What is Git and GitHub?](https://content.red-badger.com/resources/what-is-git-and-github)
- [What is version control?](https://www.atlassian.com/git/tutorials/what-is-version-control)
- [What is Git?](https://www.atlassian.com/git/tutorials/what-is-git)