SlideShare a Scribd company logo
On Campus UNSTPB
Welcome to the
Git & GitHub
Workshop!
Today’s agenda:
1. Git - Introduction and basic commands
by Goanta Rares
Learn how to install Git, navigate Git Bash, and use basic commands
along with creating branches and merging changes.
2. GitHub - Contribute and Collaborate
by Marinescu Teodor
Discover how to create and clone repositories, collaborate by pushing
changes, fork repositories, create pull requests, and manage contributions
from a maintainer's perspective.
3. Q&A and Networking
On Campus UNSTPB
Part 1: Git
What is
Git?
● Git is officially defined as a distributed version control
system (VCS).
● It's a system that tracks changes to our project files
over time
● It is used to efficiently work together and collaborate
on team projects
How about GitHub?
● GitHub is a hosting platform for Git
repositories
● Using GitHub, we can upload a local project
repository to a remote cloud-based GitHub
Repository
● GitHub is also a popular way developers for
developers to publish their portfolio online
Useful navigation commands
in the command-line interface
● mkdir – creates directory
● touch - creates file
● cd – changes directory
● rm – removes directory
Setup instructions
● Install git on your computers. Go to
https://git-scm.com/downloads
● After installing it, start your terminal
and type the following command:
git --version
Configuring
● git config --global user.name "Your
Name"
● git config --global user.email
your@email.com
● not used to log in anywhere, used to
track who made what changes
● A Git repository is a container for a project that is tracked by Git
○ Local repository = an isolated repository stored on your own computer
○ Remote repository = generally stored outside of your isolated local system,
usually on a remote server; useful for working in teams
● Initializing a repository (git init)
○ If you want to use git to track the changes in a folder you have to initialize it first
● Checking the status (git status)
○ used to check changes and tracked/untracked files
Repositories
git add
● Adds files to the staging area, which allows git to
track those files
● syntax:
○ git add file.js – one file
○ git add file.js file2.js file3.js – multiple files
○ git add . – all the files and folders
● Checking the status (git status)
○ used to check changes and
tracked/untracked files
git commit
● Saves a snapshot of your code at a particular
time
● syntax:
○ git commit -m „Commit message”
git log
● used to see the commit history
git checkout
● Used to go to a previous state of your code that you
commited
○ syntax: git checkout <commit-hash>
○ You can see the commit hashes when you use git log
● To go back you can use:
○ git checkout master
● Individual timelines of our project commits, where versions of our
project code can exist and be tracked in parallel
○ git branch - lists the branches
○ git branch <new-branch-name> - creates a new branch
● Changing branches:
○ git checkout <branch-name> (hence the git checkout
master from before)
Branches
● Used to implement the code changes that you
made in an individual branch to a different
branch (usually on master)
○ syntax:
git merge <branch-name>
● Deleting branches
○ syntax:
git branch -d <branch-name>
Merging branches (git merge)
Part 2: GitHub
Step-by-step Guide to Collaboration and Advanced
GitHub Features
Create a GitHub
account if you don’t
already have one
Send us your GitHub
usernames
ⓘ
Click Present with Slido or install our Chrome extension to activate
this poll while presenting.
Step 1: Create a GitHub Repository
● Log in: Go to GitHub and log into your account.
● New Repository: Click the + icon (top-right) New repository.
→
● Name: Enter a name for your repository.
● Visibility: Choose Public (anyone can see) or Private (restricted access).
● Optional: Add a description, README, .gitignore, or license.
● Create: Click Create repository.
● Push Code (Optional): Use the commands provided to push your local
code.
Step 2: Add Collaborators
● Go to your repository → Settings
● Click Manage access → Invite a collaborator
● Enter their GitHub username or email → Add
● Collaborator accepts the invitation. Done!
Step 3: Clone the Repository
1. Copy the repository URL (HTTPS, SSH, or GitHub
CLI).
2. Open your terminal.
3. Run: git clone <repo-ulr>
4. Navigate to the cloned repository folder.
cd repo-name
Step 4: Create Your Own Branch
1. Run the command:
git branch <branch-name>
2. Switch to your branch:
git checkout <branch-name>/git switch <branch-name>
3. Verify the branch:
git branch
4. Push the branch:
git push -u origin <branch-name>
Step 5: Stash Changes
• Save your work
– git stash
• Come back later
– git stash pop
• See what’s saved
– git stash list
Step 6: Push Changes
● Create a new file and add content.
○ git add <file-name> / git add . (all)
○ git restore --staged <file-name> / .(all)
● Commit:
○ git commit -m "message"
● Push changes:
○ git push origin <branch-name>
Step 7: Pull Request and Merge
1. Go to the GitHub repository.
2. Click on 'Pull Requests' and select 'New Pull Request'.
3. Compare changes and select your branch.
4. Add a description and click 'Create Pull Request'.
5. Merge the request after review.
Step 8: Fork a Repository
1. Go to the repository you want to fork.
2. Click the 'Fork' button on the top right.
3. Choose your account to fork the repository.
4. Clone the forked repository and start
contributing.
OVERVIEW
3 scenarios
Scenario 1: Working Solo on Your Own Projects
1. Create a directory on your computer:
mkdir <project-directory>
cd <project-directory>
2. Initialize a local repository:
git init
3. Create a GitHub repository and connect it as the remote origin:
git remote add origin <repo-url>
4. Make changes to your files and track them:
git add .
git commit -m "Describe changes"
5. Push changes to GitHub:
git push -u origin master
Your project is now on GitHub, and you can track its progress and share it with others if
needed.
Scenario 2: Collaborating with Friends
Repository Owner:
Add collaborators on GitHub: Navigate to Settings > Access > Collaborators > Add People
Collaborators:
Clone the repository:
git clone <repo-url>
Everyone:
Create and switch to your own branch:
git branch <branch-name>
git checkout <branch-name>
Make changes, stage, and commit:
git add .
git commit -m "Describe changes"
Push your branch to GitHub:
git push -u origin <branch-name>
Open a pull request on GitHub:
Go to Pull Requests > Compare & pull request
Select your branch to compare with the main branch.
Resolve conflicts (if any) and merge the pull request.
Useful VS Code extensions:
Git Graph: Visualize commit history
and branch structure.
GitHub Pull Requests: Manage PRs
and resolve conflicts in VS Code.
GitLens: View file history,
authorship, and commit details.
Scenario 3: Collaborating to a larger project
(where you are not collaborator)
1. Fork the repository:
Click the Fork button in the top-right corner of the repository on GitHub.
2. Clone your forked repository:
git clone <your-fork-url>
3. Create and switch to a new branch:
git branch <branch-name>
git checkout <branch-name>
4. Make changes, stage, and commit:
git add .
git commit -m "Describe changes"
5. Push changes to your fork:
git push origin <branch-name>
6. Open a pull request:
Go to the original repository on GitHub.
Navigate to Pull Requests > Compare & pull request
Select your branch from your fork and propose it for the base branch of the original repository.
*extra Teo stuff from work idk
ⓘ
Click Present with Slido or install our Chrome extension to show live
Q&A while presenting.
Q&A (we forgot to show this part)

More Related Content

PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
PPTX
Git and GitHub workshop of GDG on Campus UNSTPB
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
PPTX
tech winter break workshop on git &git hub.pptx
PPTX
Get your Git on GitHub
PDF
GDSC GIT AND GITHUB
PPTX
Git and GitHub
PPTX
3DC Intro to Git Workshop
Git and GitHub Workshop of GDG on Campus UNSTPB
Git and GitHub workshop of GDG on Campus UNSTPB
Git and GitHub Workshop of GDG on Campus UNSTPB
tech winter break workshop on git &git hub.pptx
Get your Git on GitHub
GDSC GIT AND GITHUB
Git and GitHub
3DC Intro to Git Workshop

Similar to Git and GitHub Presentation of GDG on Campus UNSTPB (20)

PPTX
Git and GitHub (1).pptx
PDF
Git & GitHub WorkShop
PPTX
Intro. to Git and Github
PDF
Git Init (Introduction to Git)
PPTX
Git and Github.pptx
PPTX
GitHub Event.pptx
PDF
Version Control Systems Software Engineering
PPTX
Git Tutorials Git vs GitHub.pptx
PPTX
Introduction to Git and GitHub Part 1
PPTX
Beginner's guide to git and github
PDF
Git workshop
PPTX
A prentation on github
PDF
git and github
PPTX
Introduction to Git and Github
PDF
Git, GitHub and Open Source
PPTX
GDSC Git event 2023.pptx
PPTX
GitHub Basics - Derek Bable
PPTX
Git first contributions
PDF
PPTX
Introduction to github slideshare
Git and GitHub (1).pptx
Git & GitHub WorkShop
Intro. to Git and Github
Git Init (Introduction to Git)
Git and Github.pptx
GitHub Event.pptx
Version Control Systems Software Engineering
Git Tutorials Git vs GitHub.pptx
Introduction to Git and GitHub Part 1
Beginner's guide to git and github
Git workshop
A prentation on github
git and github
Introduction to Git and Github
Git, GitHub and Open Source
GDSC Git event 2023.pptx
GitHub Basics - Derek Bable
Git first contributions
Introduction to github slideshare
Ad

Recently uploaded (20)

PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Transform Your Business with a Software ERP System
PDF
Download FL Studio Crack Latest version 2025 ?
PPTX
L1 - Introduction to python Backend.pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Nekopoi APK 2025 free lastest update
PDF
Cost to Outsource Software Development in 2025
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Monitoring Stack: Grafana, Loki & Promtail
Computer Software and OS of computer science of grade 11.pptx
Reimagine Home Health with the Power of Agentic AI​
wealthsignaloriginal-com-DS-text-... (1).pdf
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Transform Your Business with a Software ERP System
Download FL Studio Crack Latest version 2025 ?
L1 - Introduction to python Backend.pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Salesforce Agentforce AI Implementation.pdf
Complete Guide to Website Development in Malaysia for SMEs
Nekopoi APK 2025 free lastest update
Cost to Outsource Software Development in 2025
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Why Generative AI is the Future of Content, Code & Creativity?
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Ad

Git and GitHub Presentation of GDG on Campus UNSTPB

  • 1. On Campus UNSTPB Welcome to the Git & GitHub Workshop!
  • 2. Today’s agenda: 1. Git - Introduction and basic commands by Goanta Rares Learn how to install Git, navigate Git Bash, and use basic commands along with creating branches and merging changes. 2. GitHub - Contribute and Collaborate by Marinescu Teodor Discover how to create and clone repositories, collaborate by pushing changes, fork repositories, create pull requests, and manage contributions from a maintainer's perspective. 3. Q&A and Networking On Campus UNSTPB
  • 4. What is Git? ● Git is officially defined as a distributed version control system (VCS). ● It's a system that tracks changes to our project files over time ● It is used to efficiently work together and collaborate on team projects
  • 5. How about GitHub? ● GitHub is a hosting platform for Git repositories ● Using GitHub, we can upload a local project repository to a remote cloud-based GitHub Repository ● GitHub is also a popular way developers for developers to publish their portfolio online
  • 6. Useful navigation commands in the command-line interface ● mkdir – creates directory ● touch - creates file ● cd – changes directory ● rm – removes directory
  • 7. Setup instructions ● Install git on your computers. Go to https://git-scm.com/downloads ● After installing it, start your terminal and type the following command: git --version Configuring ● git config --global user.name "Your Name" ● git config --global user.email [email protected] ● not used to log in anywhere, used to track who made what changes
  • 8. ● A Git repository is a container for a project that is tracked by Git ○ Local repository = an isolated repository stored on your own computer ○ Remote repository = generally stored outside of your isolated local system, usually on a remote server; useful for working in teams ● Initializing a repository (git init) ○ If you want to use git to track the changes in a folder you have to initialize it first ● Checking the status (git status) ○ used to check changes and tracked/untracked files Repositories
  • 9. git add ● Adds files to the staging area, which allows git to track those files ● syntax: ○ git add file.js – one file ○ git add file.js file2.js file3.js – multiple files ○ git add . – all the files and folders ● Checking the status (git status) ○ used to check changes and tracked/untracked files git commit ● Saves a snapshot of your code at a particular time ● syntax: ○ git commit -m „Commit message”
  • 10. git log ● used to see the commit history git checkout ● Used to go to a previous state of your code that you commited ○ syntax: git checkout <commit-hash> ○ You can see the commit hashes when you use git log ● To go back you can use: ○ git checkout master
  • 11. ● Individual timelines of our project commits, where versions of our project code can exist and be tracked in parallel ○ git branch - lists the branches ○ git branch <new-branch-name> - creates a new branch ● Changing branches: ○ git checkout <branch-name> (hence the git checkout master from before) Branches
  • 12. ● Used to implement the code changes that you made in an individual branch to a different branch (usually on master) ○ syntax: git merge <branch-name> ● Deleting branches ○ syntax: git branch -d <branch-name> Merging branches (git merge)
  • 13. Part 2: GitHub Step-by-step Guide to Collaboration and Advanced GitHub Features
  • 14. Create a GitHub account if you don’t already have one
  • 15. Send us your GitHub usernames ⓘ Click Present with Slido or install our Chrome extension to activate this poll while presenting.
  • 16. Step 1: Create a GitHub Repository ● Log in: Go to GitHub and log into your account. ● New Repository: Click the + icon (top-right) New repository. → ● Name: Enter a name for your repository. ● Visibility: Choose Public (anyone can see) or Private (restricted access). ● Optional: Add a description, README, .gitignore, or license. ● Create: Click Create repository. ● Push Code (Optional): Use the commands provided to push your local code.
  • 17. Step 2: Add Collaborators ● Go to your repository → Settings ● Click Manage access → Invite a collaborator ● Enter their GitHub username or email → Add ● Collaborator accepts the invitation. Done!
  • 18. Step 3: Clone the Repository 1. Copy the repository URL (HTTPS, SSH, or GitHub CLI). 2. Open your terminal. 3. Run: git clone <repo-ulr> 4. Navigate to the cloned repository folder. cd repo-name
  • 19. Step 4: Create Your Own Branch 1. Run the command: git branch <branch-name> 2. Switch to your branch: git checkout <branch-name>/git switch <branch-name> 3. Verify the branch: git branch 4. Push the branch: git push -u origin <branch-name>
  • 20. Step 5: Stash Changes • Save your work – git stash • Come back later – git stash pop • See what’s saved – git stash list
  • 21. Step 6: Push Changes ● Create a new file and add content. ○ git add <file-name> / git add . (all) ○ git restore --staged <file-name> / .(all) ● Commit: ○ git commit -m "message" ● Push changes: ○ git push origin <branch-name>
  • 22. Step 7: Pull Request and Merge 1. Go to the GitHub repository. 2. Click on 'Pull Requests' and select 'New Pull Request'. 3. Compare changes and select your branch. 4. Add a description and click 'Create Pull Request'. 5. Merge the request after review.
  • 23. Step 8: Fork a Repository 1. Go to the repository you want to fork. 2. Click the 'Fork' button on the top right. 3. Choose your account to fork the repository. 4. Clone the forked repository and start contributing.
  • 25. Scenario 1: Working Solo on Your Own Projects 1. Create a directory on your computer: mkdir <project-directory> cd <project-directory> 2. Initialize a local repository: git init 3. Create a GitHub repository and connect it as the remote origin: git remote add origin <repo-url> 4. Make changes to your files and track them: git add . git commit -m "Describe changes" 5. Push changes to GitHub: git push -u origin master Your project is now on GitHub, and you can track its progress and share it with others if needed.
  • 26. Scenario 2: Collaborating with Friends Repository Owner: Add collaborators on GitHub: Navigate to Settings > Access > Collaborators > Add People Collaborators: Clone the repository: git clone <repo-url> Everyone: Create and switch to your own branch: git branch <branch-name> git checkout <branch-name> Make changes, stage, and commit: git add . git commit -m "Describe changes" Push your branch to GitHub: git push -u origin <branch-name> Open a pull request on GitHub: Go to Pull Requests > Compare & pull request Select your branch to compare with the main branch. Resolve conflicts (if any) and merge the pull request. Useful VS Code extensions: Git Graph: Visualize commit history and branch structure. GitHub Pull Requests: Manage PRs and resolve conflicts in VS Code. GitLens: View file history, authorship, and commit details.
  • 27. Scenario 3: Collaborating to a larger project (where you are not collaborator) 1. Fork the repository: Click the Fork button in the top-right corner of the repository on GitHub. 2. Clone your forked repository: git clone <your-fork-url> 3. Create and switch to a new branch: git branch <branch-name> git checkout <branch-name> 4. Make changes, stage, and commit: git add . git commit -m "Describe changes" 5. Push changes to your fork: git push origin <branch-name> 6. Open a pull request: Go to the original repository on GitHub. Navigate to Pull Requests > Compare & pull request Select your branch from your fork and propose it for the base branch of the original repository.
  • 28. *extra Teo stuff from work idk
  • 29. ⓘ Click Present with Slido or install our Chrome extension to show live Q&A while presenting. Q&A (we forgot to show this part)

Editor's Notes

  • #15: 📣 This is Slido interaction slide, please don't delete it. ✅ Click on 'Present with Slido' and the poll will launch automatically when you get to this slide.
  • #29: 📣 This is Slido interaction slide, please don't delete it. ✅ Click on 'Present with Slido' and the questions from your audience will appear when you get to this slide.