Mastering Version Control with Git & GitHub

nhidiyoussef8 0 views 43 slides Oct 16, 2025
Slide 1
Slide 1 of 43
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43

About This Presentation

hands-on workshop to learn how developers use Git and GitHub to manage projects, collaborate efficiently, and keep track of every change in their code.
We’ll cover the basics of version control, repositories, commits, branches, and pull requests — everything you need to start working like a pro ...


Slide Content

Version Control and
Workflow
Git - GitHub
16-10-2025

Who am I ?
•Data Scientist

•Research Master's Student, Faculty
of Science of Sfax (FSS)

Plan
Part 1 — Theoretical Foundations
Part 2 — Practical Session

A
Part 1 — Theoretical Foundations
1

A
Part 1 — Theoretical Foundations
B
Modification
2

A
Part 1 — Theoretical Foundations
B
Saved
3

A
Part 1 — Theoretical Foundations
B
How to keep the 2 versions?
4

Bad solutions
Part 1 — Theoretical Foundations
5

Problematic
Part 1 — Theoretical Foundations
How to manage files versions
effectively?
6

Version Control
•System that tracks every change made to your
codebase.
Part 1 — Theoretical Foundations
•Allows developers to revert, compare, and
collaborate safely.
7

Why Every Developer Needs
It?
Keeps a complete history of your project
Part 1 — Theoretical Foundations
8

Why Every Developer Needs
It?
Allows experimentation without fear of breaking the main code
Part 1 — Theoretical Foundations
9

Benefits for Teams and Open
Source
•Teams can work in parallel on different features.
Part 1 — Theoretical Foundations
•Merge and review changes without overwriting others.
10

Benefits for Teams and Open
Source
•Enables open-source collaboration
•Supports automation and DevOps pipelines.
Part 1 — Theoretical Foundations
11

DevOps
DevOps is a set of practices that combines software development (Dev) and IT operations (Ops) to
shorten the systems development life cycle and provide continuous delivery with high software
quality.
Part 1 — Theoretical Foundations
12

Part 1 — Theoretical Foundations
Git
•Git = Distributed Version Control System (DVCS)

•Manages snapshots of the project

•Each developer has a full local history
13

Part 1 — Theoretical Foundations
Git architecture
•Working Directory:

•Staging Area (Index):

•Local Repository:

•Remote Repository:

Where you make changes

Prepares changes for commit

Stores confirmed commits

Shared version on GitHub
14

Part 1 — Theoretical Foundations
Key Concepts
•Commit
•Branch
•Merge
15
Concept Description
Repository Project folder tracked by Git
Commit Snapshot of your code at a specific time
Branch Independent line of development
Merge Combine changes between branches
Remote A hosted version of your repo (e.g., GitHub)

Part 1 — Theoretical Foundations
Github
•Web-based hosting for Git repositories
that provides version control and
collaboration features.
“Git tracks code. GitHub connects people.”
16

Part 1 — Theoretical Foundations
Core Features
•Repositories: Store and version your code
•Forks: Copy someone’s repo to make your own
changes
•Pull Requests (PRs): Propose changes to a
project
17

Part 2 — Practical Session
Objective of the workshop
•Push a file or a project to a distant repository
•Fork and clone an existing project
18

Part 2 — Practical Session
Steps:
Install Git
https://git-scm.com/downloads
19

Part 2 — Practical Session
Steps:
Create a GitHub account and try to create an
empty project
20

Part 2 — Practical Session
Steps:
•Create a folder named “workshop”
•Under it, create a text file “test.txt”
21

Part 2 — Practical Session
Steps:
Open cmd/power_shell/git_bash(CLI) under
the folder “workshop”
22

Part 2 — Practical Session
Steps:
Initialize a git repository:
git init
23

Part 2 — Practical Session
Steps:
Providing information about the current state
of your repository:
git status
24

Part 2 — Practical Session
Steps:
Staging your files to make them ready to
commit:
git add .
25

Part 2 — Practical Session
Steps:
Author authentication:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
26

Part 2 — Practical Session
Steps:
Commit your files with a comment:
git commit -m "first commit"
27

Part 2 — Practical Session
Steps:
Visualize your commits:
•ID of a commit
•A comment
•Author information (email-name...)
•Creation date
28

Part 2 — Practical Session
Steps:
Visualize your commits:
git log
29

Part 2 — Practical Session
Steps:
Create a new branch to work on:
git branch "new_branch_name"
30

Part 2 — Practical Session
Steps:
Reallocate to the new branch:
git checkout "new_branch_name"
31

Part 2 — Practical Session
Steps:
Create a text file (feature.txt) in your repo and
make some modifications on it
32

Part 2 — Practical Session
Steps:
We repeat same process:
git add .
git commit -m "add feature"
33

Part 2 — Practical Session
Steps:
Return to the principal branch
git checkout master
34

Part 2 — Practical Session
Steps:
Merge the new branch to the master:
git merge "new_branch-name"
35

Part 2 — Practical Session
Steps:
Remote to the distant repository:
git remote add origin "link"
36

Part 2 — Practical Session
Steps:
Push your files to the distant repo:
git push -u origin master
37

Part 2 — Practical Session
Fork and clone
Fork repository then clone it using:
git clone "link"
38

Part 2 — Practical Session
Next Step
•Explore more Git-GitHub
•Try other web-based hosting for Git
repositories: GitLab, DagsHub...
39

Thank you for
your attention
Get in touch