1 of 30

git and GitHub

Presented at WHOI Python Carpentries 2024-06-28

Till Hoffmann (thoffmann@hsph.harvard.edu)

Department of Biostatistics

Harvard T.H. Chan School of Public Health

2 of 30

What is git?

3 of 30

Artwork by @allison_horst

4 of 30

Artwork by @allison_horst

5 of 30

Artwork by @allison_horst

6 of 30

Installing git

7 of 30

ls -l --human-readable .

8 of 30

Artwork by @allison_horst

9 of 30

😬 Live Coding

10 of 30

11 of 30

✨ Creating Your First Commit

12 of 30

13 of 30

Artwork by @allison_horst

14 of 30

15 of 30

16 of 30

17 of 30

➕➖ Diffs and Your Second Commit

18 of 30

19 of 30

20 of 30

21 of 30

Artwork by @allison_horst

22 of 30

Creating a New Repo

  • Create a GitHub account at https://github.com/signup if you don't have one.
  • Create a new repository named whoi-git-example at https://github.com/new.

23 of 30

Artwork by @allison_horst

24 of 30

25 of 30

26 of 30

Creating a Token

  • Create a new Personal Access Token at https://github.com/settings/tokens/new.
  • Select repo scope.

27 of 30

28 of 30

🚀

29 of 30

30 of 30

🏃 Next Steps