From 3a9b4d12c6dd833be88400bd4acbea72362eafcb Mon Sep 17 00:00:00 2001 From: Prabuddha Hans <21313482@studentmail.ul.ie> Date: Sun, 15 Sep 2024 18:27:09 +0100 Subject: [PATCH 1/7] Git slides WIP --- src/slides/compsoc/3_git.md | 97 ++++++++++++++++++++++++++++++++ src/slides/compsoc/3_git/NAH.jpg | 3 + 2 files changed, 100 insertions(+) create mode 100644 src/slides/compsoc/3_git.md create mode 100644 src/slides/compsoc/3_git/NAH.jpg diff --git a/src/slides/compsoc/3_git.md b/src/slides/compsoc/3_git.md new file mode 100644 index 0000000..3974a46 --- /dev/null +++ b/src/slides/compsoc/3_git.md @@ -0,0 +1,97 @@ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +title = "Git" +date = 2024-09-18 +slides = true ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +# Git + +------------------------------------------------------------------------- + +# The 4 Ws of Git + +------------------------------------------------------------------------- + +# WHAT is Git? + +------------------------------------------------------------------------- + +# WHO is Git made for? + +------------------------------------------------------------------------- + +# WHY is Git used? + +------------------------------------------------------------------------- +WHEN is Git used? +------------------------------------------------------------------------- +Last but not least, HOW do we use Git? +------------------------------------------------------------------------- +Let's start with the WHAT +------------------------------------------------------------------------- +Git is tool that's used in the programming Industry. +------------------------------------------------------------------------- +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. +------------------------------------------------------------------------- +Now we move onto the WHO. +------------------------------------------------------------------------- +Git is a tool made for (usually) us programmers to track the work we've done. +------------------------------------------------------------------------- +Programmer socks (not) included. +------------------------------------------------------------------------- +Now we need to ask the 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 (we'll come back to this) of our work. +------------------------------------------------------------------------- +Now finally the WHEN. +------------------------------------------------------------------------- +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. +------------------------------------------------------------------------- +This place is called a Repository. +------------------------------------------------------------------------- +Now I hear you in the audience asking... +------------------------------------------------------------------------- +Why not use SVN? +------------------------------------------------------------------------- +The answer is simple. +------------------------------------------------------------------------- +![NAH](3_git/NAH.jpg) +------------------------------------------------------------------------- +An actual answer is that Git is Distributed, and SVN in centralized. +------------------------------------------------------------------------- +Simply put, devs can store their changes locally on their machines, +------------------------------------------------------------------------- +where 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. +------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/slides/compsoc/3_git/NAH.jpg b/src/slides/compsoc/3_git/NAH.jpg new file mode 100644 index 0000000..46a5931 --- /dev/null +++ b/src/slides/compsoc/3_git/NAH.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b93ccc50179e98170010e340bc6f44382e993e78fe6f46d06912da25acd4c43 +size 18232 From b267df10ef476bd27731c00e11efd19604984a97 Mon Sep 17 00:00:00 2001 From: Prabuddha Hans <21313482@studentmail.ul.ie> Date: Wed, 18 Sep 2024 14:54:38 +0100 Subject: [PATCH 2/7] Last bit of the slides --- src/slides/compsoc/3_git.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/slides/compsoc/3_git.md b/src/slides/compsoc/3_git.md index 3974a46..c4b521e 100644 --- a/src/slides/compsoc/3_git.md +++ b/src/slides/compsoc/3_git.md @@ -94,4 +94,6 @@ and then push once you're reconnected. Back to git. ------------------------------------------------------------------------- Let's start with the basics. +------------------------------------------------------------------------- +LIVE DEMONSTRATION TIME ------------------------------------------------------------------------- \ No newline at end of file From f86fe8141145453ef72bcaeff0a6492c1f5a3731 Mon Sep 17 00:00:00 2001 From: Prabuddha Hans <21313482@studentmail.ul.ie> Date: Wed, 18 Sep 2024 22:07:13 +0100 Subject: [PATCH 3/7] Added a bit more to the slides --- src/slides/compsoc/3_git.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/slides/compsoc/3_git.md b/src/slides/compsoc/3_git.md index c4b521e..1a63894 100644 --- a/src/slides/compsoc/3_git.md +++ b/src/slides/compsoc/3_git.md @@ -96,4 +96,6 @@ Back to git. Let's start with the basics. ------------------------------------------------------------------------- LIVE DEMONSTRATION TIME +------------------------------------------------------------------------- +GET OUT YOUR LAPTOP ------------------------------------------------------------------------- \ No newline at end of file From 733fe359faeafb42990ce74e7a20b6233da65938 Mon Sep 17 00:00:00 2001 From: Prabuddha Hans <21313482@studentmail.ul.ie> Date: Thu, 19 Sep 2024 11:09:46 +0100 Subject: [PATCH 4/7] Added a bit on commit messages and pulling --- src/slides/compsoc/3_git.md | 6 ++++++ src/slides/compsoc/3_git/bad_message.png | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 src/slides/compsoc/3_git/bad_message.png diff --git a/src/slides/compsoc/3_git.md b/src/slides/compsoc/3_git.md index c4b521e..5a22b20 100644 --- a/src/slides/compsoc/3_git.md +++ b/src/slides/compsoc/3_git.md @@ -96,4 +96,10 @@ Back to git. Let's start with the basics. ------------------------------------------------------------------------- LIVE DEMONSTRATION TIME +------------------------------------------------------------------------- +# DO NOT DO THIS +![BAD](3_git/bad_message.png) +------------------------------------------------------------------------- +# PLEASE DO THIS +````git pull ```` ------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/slides/compsoc/3_git/bad_message.png b/src/slides/compsoc/3_git/bad_message.png new file mode 100644 index 0000000..8d1b2a0 --- /dev/null +++ b/src/slides/compsoc/3_git/bad_message.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca10627c4c15cac9718378ba7cc16b20b74a571a21e1c1658de8fe82bf71a7e8 +size 143553 From bc322c0ee708cba586996662ca8dec09e35286df Mon Sep 17 00:00:00 2001 From: Prabuddha Hans <21313482@studentmail.ul.ie> Date: Sun, 22 Sep 2024 21:13:31 +0100 Subject: [PATCH 5/7] Fix: formatting --- src/slides/compsoc/3_git.md | 99 +++++++++++++++++++++++++++++++++---- 1 file changed, 89 insertions(+), 10 deletions(-) diff --git a/src/slides/compsoc/3_git.md b/src/slides/compsoc/3_git.md index 1f819de..848b11e 100644 --- a/src/slides/compsoc/3_git.md +++ b/src/slides/compsoc/3_git.md @@ -8,100 +8,179 @@ slides = true ------------------------------------------------------------------------- -# The 4 Ws of Git +The 4 Ws of Git ------------------------------------------------------------------------- -# WHAT is Git? +WHAT is Git? ------------------------------------------------------------------------- -# WHO is Git made for? +WHO is Git made for? ------------------------------------------------------------------------- -# WHY is Git used? +WHY is Git used? ------------------------------------------------------------------------- + WHEN is Git used? + ------------------------------------------------------------------------- + Last but not least, HOW do we use Git? + ------------------------------------------------------------------------- + Let's start with the WHAT + ------------------------------------------------------------------------- + Git is tool that's used in the programming Industry. + ------------------------------------------------------------------------- + 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. + ------------------------------------------------------------------------- + Now we move onto the WHO. + ------------------------------------------------------------------------- + Git is a tool made for (usually) us programmers to track the work we've done. + ------------------------------------------------------------------------- + Programmer socks (not) included. + ------------------------------------------------------------------------- + Now we need to ask the 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 (we'll come back to this) of our work. + +without affecting the main area/branch (we'll return to this) of our work. + ------------------------------------------------------------------------- + Now finally the WHEN. + ------------------------------------------------------------------------- + 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, + +We can then use it to commit and stage these files, + ------------------------------------------------------------------------- + and push them to a place where we can store them. + ------------------------------------------------------------------------- + This place is called a Repository. + ------------------------------------------------------------------------- + Now I hear you in the audience asking... + ------------------------------------------------------------------------- + Why not use SVN? + ------------------------------------------------------------------------- + The answer is simple. + ------------------------------------------------------------------------- + ![NAH](3_git/NAH.jpg) + ------------------------------------------------------------------------- + An actual answer is that Git is Distributed, and SVN in centralized. + ------------------------------------------------------------------------- -Simply put, devs can store their changes locally on their machines, + +Simply put, devs can store their changes locally on their machines, + ------------------------------------------------------------------------- + where 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. + ------------------------------------------------------------------------- + LIVE DEMONSTRATION TIME + ------------------------------------------------------------------------- -GET OUT YOUR LAPTOP + +Please get your laptop out + ------------------------------------------------------------------------- -# DO NOT DO THIS + +Don't do this ![BAD](3_git/bad_message.png) ------------------------------------------------------------------------- -# PLEASE DO THIS + +Please do this ````git pull ```` + ------------------------------------------------------------------------- \ No newline at end of file From 9fb641c1e06408b2adb9f186c918bb9ef879b989 Mon Sep 17 00:00:00 2001 From: Prabuddha Hans <21313482@studentmail.ul.ie> Date: Mon, 23 Sep 2024 22:15:32 +0100 Subject: [PATCH 6/7] Working on getting the idea of time-travel to make sense --- src/slides/compsoc/3_git.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/slides/compsoc/3_git.md b/src/slides/compsoc/3_git.md index 848b11e..b1bbec5 100644 --- a/src/slides/compsoc/3_git.md +++ b/src/slides/compsoc/3_git.md @@ -120,6 +120,14 @@ This place is called a Repository. ------------------------------------------------------------------------- +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 in the audience asking... ------------------------------------------------------------------------- From f4741c88893a4d456bae3f9f4f0c9097aba2a437 Mon Sep 17 00:00:00 2001 From: Prabuddha Hans <21313482@studentmail.ul.ie> Date: Wed, 25 Sep 2024 15:22:17 +0100 Subject: [PATCH 7/7] Feat: Introductory git commands --- src/slides/compsoc/3_git.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/slides/compsoc/3_git.md b/src/slides/compsoc/3_git.md index b1bbec5..32e3281 100644 --- a/src/slides/compsoc/3_git.md +++ b/src/slides/compsoc/3_git.md @@ -191,4 +191,28 @@ Don't do this Please do this ````git pull ```` -------------------------------------------------------------------------- \ No newline at end of file +------------------------------------------------------------------------- + +````git init```` + +------------------------------------------------------------------------- + +````git remote add origin ```` + +------------------------------------------------------------------------- + +````git add ```` + +------------------------------------------------------------------------- + +````git commit -m ```` + +------------------------------------------------------------------------- + +````git pull origin ```` + +------------------------------------------------------------------------- + +````git push origin ```` + +-------------------------------------------------------------------------