Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Nanda128
b8703bf5b2 slides: enhance content layout and improve visual alignment 2025-09-23 00:27:01 +01:00
Prabuddha Hans
66b821ed13 WIP: Fixing up slides 2
Fixed up the empty headers, still need to find a decent way to do images.
2025-09-22 23:49:15 +01:00
Prabuddha Hans
c1772650cb WIP: Fixing up slides 1
Need to figure out how to do the images in a good way.
2025-09-22 22:54:54 +01:00
Nanda128
a32b3f58b3 slides: update sub-title and improve content for clarity 2025-09-22 17:09:48 +01:00
Prabuddha Hans
d53435b390 WIP: git slides WIP 2025-09-22 13:35:15 +01:00
Prabuddha Hans
951f34afdb Feat: Created slides for git 2025-09-22 12:45:03 +01:00
18 changed files with 295 additions and 0 deletions

View file

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

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.