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

PPTX
Git & GitLab
PDF
PPT
Dreamforce 13 developer session: Git for Force.com developers
PDF
Introduction to Git for Force.com Developers
PDF
SCM Harmony: git & Github for Sony Teams
PPTX
Version Control System-git status,git add,git commit,git log.pptx
PPTX
Git introduction
PPTX
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git & GitLab
Dreamforce 13 developer session: Git for Force.com developers
Introduction to Git for Force.com Developers
SCM Harmony: git & Github for Sony Teams
Version Control System-git status,git add,git commit,git log.pptx
Git introduction
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...

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

PPTX
Git usage (Basics and workflow)
PPTX
Mastering Git: Version Control for Developers
PPTX
Git and GitHub
PDF
Git Tutorial
PDF
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
PDF
[2015/2016] Collaborative software development with Git
PPTX
Webinar : SVN to GIT Migration
PDF
SessionThree_IntroductionToVersionControlSystems
PDF
Version control with git
PDF
Git interview questions | Edureka
PDF
Developers Use Bitbucket and So Can You
PDF
Introducing Git and git flow
PDF
GIT_Overview.
PDF
Git workshop
PPTX
Git essential training & sharing self
ODP
Contributing to Upstream Open Source Projects
PDF
What is GitOps? How GitOps works? we discuss Key Challanges.
PDF
CS_Note_Introduction to Git Workflow.pdf
PPTX
Version control
PPTX
Git from the trenches
Git usage (Basics and workflow)
Mastering Git: Version Control for Developers
Git and GitHub
Git Tutorial
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
[2015/2016] Collaborative software development with Git
Webinar : SVN to GIT Migration
SessionThree_IntroductionToVersionControlSystems
Version control with git
Git interview questions | Edureka
Developers Use Bitbucket and So Can You
Introducing Git and git flow
GIT_Overview.
Git workshop
Git essential training & sharing self
Contributing to Upstream Open Source Projects
What is GitOps? How GitOps works? we discuss Key Challanges.
CS_Note_Introduction to Git Workflow.pdf
Version control
Git from the trenches
Ad

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
RMMM.pdf make it easy to upload and study
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Classroom Observation Tools for Teachers
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Cell Structure & Organelles in detailed.
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
master seminar digital applications in india
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Insiders guide to clinical Medicine.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
VCE English Exam - Section C Student Revision Booklet
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
RMMM.pdf make it easy to upload and study
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Classroom Observation Tools for Teachers
Microbial diseases, their pathogenesis and prophylaxis
Cell Structure & Organelles in detailed.
01-Introduction-to-Information-Management.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Anesthesia in Laparoscopic Surgery in India
Supply Chain Operations Speaking Notes -ICLT Program
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
master seminar digital applications in india
Sports Quiz easy sports quiz sports quiz
Insiders guide to clinical Medicine.pdf
O7-L3 Supply Chain Operations - ICLT Program
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Ad

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