SlideShare a Scribd company logo
Git
&GitHub
Session
Facilitator
Manee Das Shrestha
Niraj Nath
Version Control
System
GIT
G - Global
I - Information
T - Tracker
Git-GitHub-Session(how to use and why ).pdf
Git-GitHub-Session(how to use and why ).pdf
Git-GitHub-Session(how to use and why ).pdf
Version Control System
Designing a logo
for facebook
Facebook_logo.png
Version Control System
1 2
copy
FinalLogo.png
Version Control System
1 2
File File
Finalllllllllllllllllllll
Logo.png
Facebook_logo.png
1
File
Facebook_
logo.png
2
File
Finalllllllllllllllllllll
Logo.png
3
File
TrustMeThis
isFinallllllll
Logo.png
Version Control System
1
File
Facebook_
logo.png
2
File
Finalllllllllllllllllllll
Logo.png
3
File
TrustMeThis
isFinallllllll
Logo.png
What’s Wrong with this
System?
What’s Wrong with this
System?
What’s Wrong with this System?
COnfusion & Clutter
Wasted Storage
NO Change History
NO Tracking
Collaboration Chaos
Version Control System
you could just name your project
once and you could take snapshots
of the progress along the way?
WHAT IF
Git-GitHub-Session(how to use and why ).pdf
1
2
3
same file
Add shadows
Add highlights
Create a basic logo
Versions
Version Control System
Version Control System
Tracking code
changes
Tracking who
made changes
through branches
GIT
Keep a history of
previous versions.
Coding collaboration
github.com
GITHUB
website that hosts git
repositories on a remote server.
store, share, and collaborate on
your coding projects.
NOW
LETS GET
STARTED
WITH THE TECHNICAL STUFF
Git-GitHub-Session(how to use and why ).pdf
Configuring Git
Creating a Repo
1. Local Device 2. Remotely (GitHub)
Creating a Repo
Locally
WorkFlow
Workspace
Stage/Index
Repository
WorkFlow
Workspace
Stage/Index
Repository
file1
WorkFlow
Workspace
Stage/Index
Repository
file1
file1
add
Staging
WorkFlow
Workspace
Stage/Index
Repository
file1
file1
file1
add commit
Committing
1
2
3
same file
Add shadows
Add highlights
Create a basic logo
Versions
WorkFlow
Workspace
Stage/Index
Repository
file1
file1
file1
add commit
file1
file1
WorkFlow
Workspace
Stage/Index
Repository
file1
file1
add
add &
commit
again!!!
commit
Git-GitHub-Session(how to use and why ).pdf
Commit Messages
2. Use present tense of task done,
e.g. "Fix bug" instead of "Fixed a bug"
1. Keep it brief, clear and concise (50 characters or less)
3. Include relevant issue or ticket numbers
Example: DEL-1123: Add validation to uploaded files
4. Avoid using profanity or offensive language in
commit messages.
What command is used to stage changes
for the next commit?
a. git commit
c. git push
b. git add
d. git pull
WorkFlow
Workspace
Stage/Index
Local Repo
Remote Repo
file1
file1
file1
add commit
push
1. Create a new repo in GitHub
3.
2. Make sure all the changes is committed in local repo.
Which command is used to view the
commit history?
a. git status
c. git diff
b. git log
d. git merge
Git-GitHub-Session(how to use and why ).pdf
Creating a Repo
Remotely (GitHub)
Cloning
Pushing changes to Remote
What command is used to upload local
repository content to a remote repository?
a. git fetch
c. git pull
b. git push
d. git clone
Which command would you use to create a
local copy of a remote repository?
a. git init
c. git pull
b. git push
d. git clone
Branching
branching
Branching
Use descriptive and meaningful names for branches, such as:
"feature/login-page", "fix/bug-123"
Use hyphens or slashes to separate words in branch names.
Use issue or ticket numbers in branch name for better tracking
and traceability.
Use prefixes like "feature/", "fix/", "hotfix/" to indicate the
purpose of the branch.
1.
2.
3.
4.
Creating Pull Requests &
Merging
Pull Requests
A pull request is like politely asking your team to
check and add your work to the main project.
1. Facilitates collaboration by allowing developers to
propose changes to a codebase.
2. Enables peer reviews ensuring proposed
changes meet quality standards before merging.
4. Integration with Continuous Integration (CI) systems
automated testing and validation processes.
3. Fosters communication among team members,
with features like comments and reviews.
Good Practice:
Limit Pull Request to have only a SINGLE commit.
1. Integrates changes from one branch.
2. Combines changes from a feature or development
branch into the main or release branch.
4. Allows developers to incorporate new features, bug
fixes, or updates into the target branch.
3. Preserves the history of changes and ensures
collaboration among team members.
Git-GitHub-Session(how to use and why ).pdf
Git-GitHub-Session(how to use and why ).pdf
Git-GitHub-Session(how to use and why ).pdf
1. Generally arise when two people have changed the same
lines in a file, or if one developer deleted a file while
another developer was modifying it.
2. Git cannot automatically determine what is correct.
4. It is then the developers' responsibility to resolve
the conflict.
3. Git will mark the file as being conflicted and halt the
merging process.
Git-GitHub-Session(how to use and why ).pdf
Descriptive Commit Message
Pull Requests and Code Reviews
Frequent Commits
Atomic Commits
Regular Pulls and Updates
Git-GitHub-Session(how to use and why ).pdf
Scan this QR
to complete the
final level of
workshop with the
possibility of a
sweet treat :)
Git-GitHub-Session(how to use and why ).pdf
https://github.com/
maneedasshrestha/git-workshop

More Related Content

Similar to Git-GitHub-Session(how to use and why ).pdf (20)

PPTX
Git usage (Basics and workflow)
Yeasin Abedin
 
PPTX
Mastering Git: Version Control for Developers
AyeshaSharif19
 
PPTX
Git and GitHub
AshwinRaj57
 
PDF
Git Tutorial
Ahmed Taha
 
PDF
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Edureka!
 
PDF
[2015/2016] Collaborative software development with Git
Ivano Malavolta
 
PPTX
Webinar : SVN to GIT Migration
Newt Global Consulting LLC
 
PDF
SessionThree_IntroductionToVersionControlSystems
Hellen Gakuruh
 
PDF
Version control with git
Purav Gandhi
 
PDF
Git interview questions | Edureka
Edureka!
 
PDF
Developers Use Bitbucket and So Can You
Atlassian
 
PDF
Introducing Git and git flow
Sebin Benjamin
 
PDF
GIT_Overview.
Mithilesh Singh
 
PDF
Git workshop
Reslan Al Tinawi
 
PPTX
Git essential training & sharing self
Chen-Tien Tsai
 
ODP
Contributing to Upstream Open Source Projects
Scott Garman
 
PDF
What is GitOps? How GitOps works? we discuss Key Challanges.
aniporwal00
 
PDF
CS_Note_Introduction to Git Workflow.pdf
albusfons939393
 
PPTX
Version control
Shahriar Iqbal Chowdhury
 
PPTX
Git from the trenches
Nuno Caneco
 
Git usage (Basics and workflow)
Yeasin Abedin
 
Mastering Git: Version Control for Developers
AyeshaSharif19
 
Git and GitHub
AshwinRaj57
 
Git Tutorial
Ahmed Taha
 
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Edureka!
 
[2015/2016] Collaborative software development with Git
Ivano Malavolta
 
Webinar : SVN to GIT Migration
Newt Global Consulting LLC
 
SessionThree_IntroductionToVersionControlSystems
Hellen Gakuruh
 
Version control with git
Purav Gandhi
 
Git interview questions | Edureka
Edureka!
 
Developers Use Bitbucket and So Can You
Atlassian
 
Introducing Git and git flow
Sebin Benjamin
 
GIT_Overview.
Mithilesh Singh
 
Git workshop
Reslan Al Tinawi
 
Git essential training & sharing self
Chen-Tien Tsai
 
Contributing to Upstream Open Source Projects
Scott Garman
 
What is GitOps? How GitOps works? we discuss Key Challanges.
aniporwal00
 
CS_Note_Introduction to Git Workflow.pdf
albusfons939393
 
Version control
Shahriar Iqbal Chowdhury
 
Git from the trenches
Nuno Caneco
 

Recently uploaded (20)

PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Horarios de distribución de agua en julio
pegazohn1978
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
Dimensions of Societal Planning in Commonism
StefanMz
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
Ad

Git-GitHub-Session(how to use and why ).pdf