SlideShare a Scribd company logo
1 of 28
Github Bootcamp
What is Github?
● Popular version control tool
● Used for personal projects, club projects, enterprise level codebases
● Plenty of alternatives used in the industry such as Bitbucket, Gitlab
● Brings together a community with tons of resources
What is Github Desktop?
● Github, but on desktop!
● Differs to tools such as
gitbash and Command
Line Interface
Why Github Desktop?
● Compatible with
macOS, Windows,
Linux
● Works very fast on
terminals
● Very user-friendly
● Easy to collaborate
Make a Github Account
Installing Github Desktop
Visit
desktop.github.com!
Github Website Walkthrough
Creating Repositories
Start from scratch or clone an existing
repository
Creating Your First Repository
Creating Your First Repository
Name of repository
Description of repository
Location of the repository
on your computer
Ignore certain files in
the repository
A README is a file that
describes the repository
License
git clone
● Used to create a copy of an online repository to the local machine
● Github Desktop offers a very quick and easy way to clone repositories, without the use of
explicitly typing “ git push <repo link> ”
Importing a repository to local Machine
● In Github Desktop, cloning a repository you don’t own will
fork the repository
Forking a Repository
bit.ly/GDSC-test-repository
Let’s Try…
Basic Git Commands
Updating Your Code
● You’ll be able to find the local version of the repository on your computer
● If we want to change everyone’s code, we create a change on this local version and then:
1. Add the changed files
2. Commit the change (basically ‘saving’ a change)
3. Push the changes
Changing Code
1. Add the changed files
● Typically, we would add the modified files
when we want to push a change
● Stage or prepare for a commit
● However, Github Desktop automatically finds
modified files!
2. Commit your changes
● Committing a change essentially ‘saves’
your changes without uploading it to the
project
● Add a commit message to keep track of
what changes were made
3. Push your changes
● Upload your commits to the project
● Others editing the project can only view
your changes after this stage
Pulling changes
● Oftentimes, when more than 1 person is working on their project, one person makes
their changes and pushes their code to a Branch
Synchronizing Project Progress Locally
Changes shown on Github
Need to synchronize locally
Fetching changes
● git fetch tells a user if its local repository is different to the remote repository
[notification-like]
Synchronizing Project Progress Locally
Local Repository is
synced with remote
repository
Local Repository is
not synced with
remote repository
Git Branching
What is a Git Branch?
● It is a portion (branch) of your project
(tree) that has all of the content of the
main project (master)
● Changes to the branch will not affect the
rest of the project until you want to
● You can merge your new branch with any
branch by going to
Branch > Merge into current branch
● If you are working with others, you may
cause conflicts so be careful
Creating and Using a Git Branch
● Create a new branch by clicking on the branch dropdown menu and clicking
New Branch
● The branch you are on is displayed under Current Branch
● Commit your change by pressing Commit to <branch-name>
Example:
● On Github Desktop, just select the desired branch
● On Git Bash, you’d use the checkout command
Moving Between Branches
Merge conflicts occur when Git is unable to auto merge multiple independent
edits to a file. Merge conflicts get labelled in files and many text editors support
highlighting them for ease of use.
Example:
Merge Conflicts
Editing the same line in a file in two separate commits and attempts to
merge them causes merge conflicts
To resolve merge conflicts on Github Desktop, look at both versions of the conflict
and think about why they are different and which one is correct. When we
determine that, we just need to delete the incorrect statement and merge once
again.
Example:
Resolving Merge Conflicts
Two import statements that are conflicting,
import java.util.Scanner; is correct
Incorrect import
statement is deleted
Git Revert
● Reverting changes is similar to using
undo with Ctrl + Z
● Rather than removing the commit from
the project’s history, it inverts the
changes caused by the commit
● It also appends a new commit with the
resulting inverse content
● This way, Git doesn’t lose any history
and we still have access to revision
history and can collaborate reliably
Example use:
Instead of finding a bug and fixing it, by
clicking Revert changes to commit Github
will find it and automatically fix it for you
● Free perks for student github accounts and leverage paid tools
● Link: https://education.github.com/pack
Github Student Developer Pack
Thank You!

More Related Content

Similar to GDSC Git event 2023.pptx

Similar to GDSC Git event 2023.pptx (20)

Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.
 
Formation git
Formation gitFormation git
Formation git
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
 
Overview of git
Overview of gitOverview of git
Overview of git
 
Overview of git
Overview of gitOverview of git
Overview of git
 
Intro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucketIntro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucket
 
Version controll.pptx
Version controll.pptxVersion controll.pptx
Version controll.pptx
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Git and GitHub Info Session
Git and GitHub Info SessionGit and GitHub Info Session
Git and GitHub Info Session
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git for developers
Git for developersGit for developers
Git for developers
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
 
Using Git to Organize Your Project
Using Git to Organize Your ProjectUsing Git to Organize Your Project
Using Git to Organize Your Project
 
Git Basics
Git BasicsGit Basics
Git Basics
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 

More from fsxflyer789Productio

More from fsxflyer789Productio (7)

Behind the Scenes of ChatGPT.pptx
Behind the Scenes of ChatGPT.pptxBehind the Scenes of ChatGPT.pptx
Behind the Scenes of ChatGPT.pptx
 
SKLearn Workshop.pptx
SKLearn Workshop.pptxSKLearn Workshop.pptx
SKLearn Workshop.pptx
 
OpenCV with Python
OpenCV with PythonOpenCV with Python
OpenCV with Python
 
An introduction to blockchain
An introduction to blockchainAn introduction to blockchain
An introduction to blockchain
 
Building robots with Robot Operating System (ROS)
Building robots with Robot Operating System (ROS)Building robots with Robot Operating System (ROS)
Building robots with Robot Operating System (ROS)
 
GDSC x Fintech Algorithmic Investing event
GDSC x Fintech Algorithmic Investing eventGDSC x Fintech Algorithmic Investing event
GDSC x Fintech Algorithmic Investing event
 
Unity workshop
Unity workshopUnity workshop
Unity workshop
 

Recently uploaded

Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 

Recently uploaded (20)

Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 

GDSC Git event 2023.pptx

  • 2. What is Github? ● Popular version control tool ● Used for personal projects, club projects, enterprise level codebases ● Plenty of alternatives used in the industry such as Bitbucket, Gitlab ● Brings together a community with tons of resources
  • 3. What is Github Desktop? ● Github, but on desktop! ● Differs to tools such as gitbash and Command Line Interface
  • 4. Why Github Desktop? ● Compatible with macOS, Windows, Linux ● Works very fast on terminals ● Very user-friendly ● Easy to collaborate
  • 5. Make a Github Account
  • 8. Creating Repositories Start from scratch or clone an existing repository
  • 9. Creating Your First Repository
  • 10. Creating Your First Repository Name of repository Description of repository Location of the repository on your computer Ignore certain files in the repository A README is a file that describes the repository License
  • 11. git clone ● Used to create a copy of an online repository to the local machine ● Github Desktop offers a very quick and easy way to clone repositories, without the use of explicitly typing “ git push <repo link> ” Importing a repository to local Machine
  • 12. ● In Github Desktop, cloning a repository you don’t own will fork the repository Forking a Repository
  • 15. ● You’ll be able to find the local version of the repository on your computer ● If we want to change everyone’s code, we create a change on this local version and then: 1. Add the changed files 2. Commit the change (basically ‘saving’ a change) 3. Push the changes Changing Code
  • 16. 1. Add the changed files ● Typically, we would add the modified files when we want to push a change ● Stage or prepare for a commit ● However, Github Desktop automatically finds modified files!
  • 17. 2. Commit your changes ● Committing a change essentially ‘saves’ your changes without uploading it to the project ● Add a commit message to keep track of what changes were made
  • 18. 3. Push your changes ● Upload your commits to the project ● Others editing the project can only view your changes after this stage
  • 19. Pulling changes ● Oftentimes, when more than 1 person is working on their project, one person makes their changes and pushes their code to a Branch Synchronizing Project Progress Locally Changes shown on Github Need to synchronize locally
  • 20. Fetching changes ● git fetch tells a user if its local repository is different to the remote repository [notification-like] Synchronizing Project Progress Locally Local Repository is synced with remote repository Local Repository is not synced with remote repository
  • 21. Git Branching What is a Git Branch? ● It is a portion (branch) of your project (tree) that has all of the content of the main project (master) ● Changes to the branch will not affect the rest of the project until you want to ● You can merge your new branch with any branch by going to Branch > Merge into current branch ● If you are working with others, you may cause conflicts so be careful
  • 22. Creating and Using a Git Branch ● Create a new branch by clicking on the branch dropdown menu and clicking New Branch ● The branch you are on is displayed under Current Branch ● Commit your change by pressing Commit to <branch-name> Example:
  • 23. ● On Github Desktop, just select the desired branch ● On Git Bash, you’d use the checkout command Moving Between Branches
  • 24. Merge conflicts occur when Git is unable to auto merge multiple independent edits to a file. Merge conflicts get labelled in files and many text editors support highlighting them for ease of use. Example: Merge Conflicts Editing the same line in a file in two separate commits and attempts to merge them causes merge conflicts
  • 25. To resolve merge conflicts on Github Desktop, look at both versions of the conflict and think about why they are different and which one is correct. When we determine that, we just need to delete the incorrect statement and merge once again. Example: Resolving Merge Conflicts Two import statements that are conflicting, import java.util.Scanner; is correct Incorrect import statement is deleted
  • 26. Git Revert ● Reverting changes is similar to using undo with Ctrl + Z ● Rather than removing the commit from the project’s history, it inverts the changes caused by the commit ● It also appends a new commit with the resulting inverse content ● This way, Git doesn’t lose any history and we still have access to revision history and can collaborate reliably Example use: Instead of finding a bug and fixing it, by clicking Revert changes to commit Github will find it and automatically fix it for you
  • 27. ● Free perks for student github accounts and leverage paid tools ● Link: https://education.github.com/pack Github Student Developer Pack