Git - Introduction
Git - Introduction
Git - Introduction
Rolf Wuthrich
Concordia University
Introduction
Git is a free and open source distributed version
control system designed to handle everything
from small to very large projects with speed and
efficiency.
Git was originally authored by Linus Torvalds in 2005 for development of the Linux kernel, with other
kernel developers contributing to its initial development. Since 2005, Junio Hamano has been the
core maintainer.
Overview
Remote
repository
Alice Local
repository
Bob
Local
repository
Git clone Remote
repository
git clone
Alice Local
repository
4
Git clone
JupyterLab GUI Terminal
my-feature-branch
main branch
Making commits to your branch
▪ When working with git it is very common to loose track of what exactly is
committed / changed /staged etc…
▪ Other operations too can add to the confusion (we will soon see more of
them)
▪ Your best friend to know what is the status of your local repository and
suggestions on what should be done is the command:
git status
8
Keeping your local repository in sync with
remote repository
9
Creating your own branch
my-feature-branch
main branch
Making commits to your branch
commits added to your branch
my-feature-branch
main branch
Commits added to main branch
commits added to your branch
my-feature-branch
main branch
my-feature-branch
main branch
14
Possible conflicts during rebase
▪ Delete conflicts
▪ A file you have modified was deleted on the main branch
▪ Merge conflicts
▪ A file has modifications from you and the main branch and these
modifications are conflicting
15
Resolving conflicts during rebase
16