slides: update sub-title and improve content for clarity

This commit is contained in:
Nanda128 2025-09-22 17:09:48 +01:00
parent d53435b390
commit a32b3f58b3
2 changed files with 132 additions and 65 deletions

View file

@ -1,6 +1,6 @@
--- ---
title: "Intro to git" title: "Intro to git"
sub_title: "Force push" sub_title: "git push -f origin main"
author: "Prabuddha Hans" author: "Prabuddha Hans"
date: "2025-09-22" date: "2025-09-22"
@ -10,348 +10,407 @@ theme:
# Git # Git
------------------------------------------------------------------------- =================================
Git is tool that's used in the programming industry. Git is tool that's used in the programming industry.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Another name for Git is a Version Control System (VCS) tool. Another name for Git is a Version Control System (VCS) tool.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Specifically to track project work done, and the changes to files we've made. Specifically to track project work done, and the changes to files we've made.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
The more correct term is Source Control. The more correct term is Source Control.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
It is NOT a programming language. It is NOT a programming language.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Git is a tool made for (usually) us programmers to track the work we've done. Git is a tool made for (usually) us programmers to track the work we've done.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Programmer socks (not) included. Programmer socks (not) included.
![image:width:100%](intro_to_git/compsocks.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Now we need to ask WHY. Now we need to ask WHY.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Why would we need a tool like this? Why would we need a tool like this?
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Why not use Google Drive instead? Why not use Google Drive instead?
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
I will find your IP address. I will find your IP address.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
In all honesty, In all honesty,
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
It's to help keep track of who did what. It's to help keep track of who did what.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
And to work on unique features... And to work on unique features...
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
without affecting the main area/branch of our work. without affecting the main area/branch of our work.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
When DO we use git? When DO we use git?
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Because Git keeps track of the changes we've made to files, Because Git keeps track of the changes we've made to files,
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
We can then use it to commit and stage these files, We can then use it to commit and stage these files,
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
and push them to a place where we can store them. and push them to a place where we can store them.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
This place is called a Repository. This place is called a Repository.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Repositories are hosted on websites like GitLab, GitHub and Forgejo. Repositories are hosted on websites like GitLab, GitHub and Forgejo.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
But, an interesting feature of git, is that it allows you to time-travel. But, an interesting feature of git, is that it allows you to time-travel.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Meaning that if a project breaks, you can go back to before it broke. Meaning that if a project breaks, you can go back to before it broke.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Now I hear you in the audience asking... Now I hear you in the audience asking...
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Why not use SVN? Why not use SVN?
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
The answer is simple. The answer is simple.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/NAH.jpg) ![image:width:100%](intro_to_git/NAH.jpg)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
An actual answer is that Git is Distributed, and SVN in centralized. An actual answer is that Git is Distributed, and SVN in centralized.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Simply put, devs can store their changes locally on their machines, Simply put, devs can store their changes locally on their machines,
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
where on SVN they're stored on a central system. where on SVN they're stored on a central system.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
With a central system you NEED to be connected at all times to work on it. With a central system you NEED to be connected at all times to work on it.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
You can work locally on git without having to be connected, You can work locally on git without having to be connected,
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
and then push once you're reconnected. and then push once you're reconnected.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Back to git. Back to git.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Let's start with the basics. Let's start with the basics.
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
# Live demonstration time # Live demonstration time
Please get your laptop out Please get your laptops out
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
How to download git & git LFS How to download Git & Git LFS
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
## Download ## Download
<<https://git-scm.com/downloads>> <<https://git-scm.com/downloads>>
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/git_download_button.png) ![image:width:100%](intro_to_git/git_download_button.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/git_installer.png) ![image:width:100%](intro_to_git/git_installer.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/git_installer_notepad_as_default_editor.png) ![image:width:100%](intro_to_git/git_installer_notepad_as_default_editor.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/git_installer_rename_master_to_main.png) ![image:width:100%](intro_to_git/git_installer_rename_master_to_main.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/git_installer_checkout_unix.png) ![image:width:100%](intro_to_git/git_installer_checkout_unix.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/git_installer_default_rebase_pull.png) ![image:width:100%](intro_to_git/git_installer_default_rebase_pull.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
<<https://forgejo.skynet.ie/Skynet/deploy_user>> <<https://forgejo.skynet.ie/Skynet/deploy_user>>
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Don't do this Don't do this
![image:width:100%](intro_to_git/bad_message.png) ![image:width:100%](intro_to_git/bad_message.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/forgejo_template_button.png) ![image:width:100%](intro_to_git/forgejo_template_button.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/forgejo_template_repo_creation.png) ![image:width:100%](intro_to_git/forgejo_template_repo_creation.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/forgejo_repo_link.png) ![image:width:100%](intro_to_git/forgejo_repo_link.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
LFS Install LFS Install
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
````bash ````bash
git lfs install git lfs install
```` ````
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Setup SSH key (see Readme.md)) Setup SSH key (see Readme.md))
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/forgejo_repo_settings.png) ![image:width:100%](intro_to_git/forgejo_repo_settings.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/forgejo_secrets_location.png) ![image:width:100%](intro_to_git/forgejo_secrets_location.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/forgejo_add_secret.png) ![image:width:100%](intro_to_git/forgejo_add_secret.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
![image:width:100%](intro_to_git/forgejo_ssh_key_example.png) ![image:width:100%](intro_to_git/forgejo_ssh_key_example.png)
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
````bash ````bash
git init git init
@ -362,21 +421,24 @@ git commit -m "<commit_message>"
git push origin <branch_name> git push origin <branch_name>
```` ````
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
``https://<username>.users.skynet.ie/`` ``https://<username>.users.skynet.ie/``
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
TroubleShooting TroubleShooting
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
If you see this: If you see this:
@ -384,12 +446,14 @@ If you see this:
> Credit: Geeks for Geeks > Credit: Geeks for Geeks
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================
Go here: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent Go here: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
<!-- alignment: center -->
<!-- end_slide --> <!-- end_slide -->
------------------------------------------------------------------------- =================================

BIN
slides/compsoc/2025-2025/intro_to_git/compsocks.png (Stored with Git LFS) Normal file

Binary file not shown.