SlideShare a Scribd company logo
Neruti Technology Sdn Bhd
www.neruti.com
Cheng Ping Onn
Founder & CTO
Git Advanced – Guest Lecture
TAR University College
Git Advanced Content
•Company Intro
•Dif
•Merge
•Reset
•Rebase
•Stash
•Governance
Company Background

Machine
Learning

Big Data

Insight
+ =
Maybank Fintech
IBM Global
Entrepreneur
CIP Catalyst
Recipient
Travel Recommendation
Autonomous Driving
Source: Tesla Model S
From AutoPilot to AutoLand
Source: Technology Helps Pilots Land in Fog, Wall Street Journal.

Customer
Response
Prediction
Use Cases

Credit Card
Fraud
Detection

Product
Recommendation
Machine Learning Workflow

Data

Model

Prediction

Actual
Reinforcement Learning
from previous session...
Clone
Tracking Branch
$ git diff
dif
•Deviation of content
•Similar to UNIX dif
•Traverse tree
dif
diff diagram
dif demo
•Working file - Commit
•Working file - Index
•Index - Repo
•Commit - Commit
Symmetrical dif
$ git diff master..dev
$ git log master..dev
Limiting dif Demo
$ git diff –-stat master~5
master
$ git diff --stat master~5
master directory
//list diff on a directory
$ git diff -S"target"
master~5
$ git merge
Merge
•Unify two/more branches
•Dirty working directory/index
stop merges.
•Context sensitive – current
branch is target branch
Merge demo
•Without conflict
•With conflict
•Resolve conflicts
•View dif on conflicts
Merge Types
•Fast Forward
•Recursive
•Octopus
Fast Forward Merge
•Single merge base
Recursive Merge
•Join two branches at a time
Criss Cross Recursive Merge
•Infinite recursive merge
Octopus Merge
• No conflicts
• Dangerous
• git branch1 branch2..branchN
Merge demo
•Fast Forward
•Recursive
Symmetrical Merge
• Associative
• 1+2 = 2+1 = 3
Commits & History
Altering Commits
•Fixed problem before become
legacy
•Decompose large commits
•Combine commits
•Re-order commits
Published History
•Do not alter published history
Philosophy of Commits
•Fine-grained
•Coarse
Best Practices of Commit
•Meaningful message
•No identical messages
•No altering of published histories
Bad Commit Messages
$ git reset
Reset
•Recover known state
•HEAD, index and working
directory
•Can be destructive
Reset Types
HEAD Index Working Directory
reset --soft Yes No No
reset --mixed Yes Yes No
reset --hard Yes Yes Yes
Reset demo
$ git reset –-soft
$ git reset –-mixed
$ git reset --hard
$ git cherry-pick
Cherry-pick demo
$ git checkout master
$ git cherry-pick dev~2
reset vs. checkout
•reset: recover current branch
HEAD state
•checkout: branch/file
Checkout File demo
$ git checkout –-
path/filename
$ git checkout branch –-
path/filename
Amend demo
$ git commit --amend
$ git rebase
Rebase
•Important and Useful
•Alter sequence of commits
•Don't rebase public history
Rebase - after
$ git checkout dev
$ git rebase master
or
$ git rebase master dev
Rebase - demo
Rebase -i
•Interactive manipulate commits
•Squash commits together
•Developers must-have tool
Rebase - interactive
$ git rebase -i master~3
Rebase vs Merge
$ git stash
Stash
•Capture work in progress
•Temporary store
•index & working directory state.
•Interrupted work flow
•Can't push to remote
Stash Demo
Git in Team
Leadership Models
1)Benevolent Dictator for Life
(BDFL) (Ubuntu, Linux)
2)Consensus-driven, leader-
approved (Drupal)
3)Technical Review Board
(Apache)
Access Model – One-Way
Access Model - Dispersed
Access Model - Collocate
Access Models - All
www.neruti.com
@neruti
Cheng Ping Onn
ping@neruti.com
Slides: facebook.com/pocheng

More Related Content

PDF
Guest Lecture - GIT Version Control
PDF
Tarc git guest_lecture
PDF
Mdec Ideas Xchange
PDF
MDEC Fintech Conference - The Financial Regulations and Policies Every (Malay...
PDF
MDEC Fintech Conference - Keynote: Overview of Fintech in 2016
PDF
MDEC Fintech Conference - Banking on the Future of Blockchains, Mark Smalley ...
PDF
MDEC Fintech Conference - Opening Remarks - Ir. Wan Murdani
PDF
MDEC Fintech Conference - The Soft Space Journey
Guest Lecture - GIT Version Control
Tarc git guest_lecture
Mdec Ideas Xchange
MDEC Fintech Conference - The Financial Regulations and Policies Every (Malay...
MDEC Fintech Conference - Keynote: Overview of Fintech in 2016
MDEC Fintech Conference - Banking on the Future of Blockchains, Mark Smalley ...
MDEC Fintech Conference - Opening Remarks - Ir. Wan Murdani
MDEC Fintech Conference - The Soft Space Journey

Viewers also liked (16)

PDF
MDEC Fintech Conference - Facilitating Innovation Through The Fintech Regulat...
PDF
MDEC Fintech Conference - Demystifying Fintech in the SMAC Era, Darien Nagle ...
PPSX
Entrepreneurship fintech & islamic finance v1.4
PDF
MDEC Fintech Conference - How I was not Killed by the Money Changer Families,...
PDF
MDEC Fintech Conference - A Look into Bank's Fintech Initiatives (RHB)
PPTX
Modal verbs
PPT
Ice Strategic Overview 2011 V1
ODP
What's hot on Facebook - 17/03/2011
PDF
eParticipatie en social media Kennissessie presentatie
PPT
MongoDB Basics and Tutorial
PPT
Ireland the road to partition guzman 2011
DOC
Skf q3 2010_pr_eng
 
PPTX
16 the doppler effect
PDF
Content Marketing for business growth
PPT
B-Validus Presentation
MDEC Fintech Conference - Facilitating Innovation Through The Fintech Regulat...
MDEC Fintech Conference - Demystifying Fintech in the SMAC Era, Darien Nagle ...
Entrepreneurship fintech & islamic finance v1.4
MDEC Fintech Conference - How I was not Killed by the Money Changer Families,...
MDEC Fintech Conference - A Look into Bank's Fintech Initiatives (RHB)
Modal verbs
Ice Strategic Overview 2011 V1
What's hot on Facebook - 17/03/2011
eParticipatie en social media Kennissessie presentatie
MongoDB Basics and Tutorial
Ireland the road to partition guzman 2011
Skf q3 2010_pr_eng
 
16 the doppler effect
Content Marketing for business growth
B-Validus Presentation
Ad

Similar to Git Advanced (20)

PPTX
Git tips
PDF
Professional Git 1st Edition Brent Laster
PDF
Advanced Git - Functionality and Features
PPTX
Git presentation bixlabs
PPTX
Learn Git - For Beginners and Intermediate levels
PPTX
Git workshop 33degree 2011 krakow
PDF
Git of every day
PPTX
MakingGitWorkForYou
PDF
git Behind the Scenes - Daphna Regev
PDF
Professional Git 1st Edition Brent Laster
PDF
Git training v10
PPTX
Git - Version Control System
PDF
Git tutorial
PDF
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
PDF
Intermediate Git
PDF
Advanced Git
PPTX
Git and Github
PPTX
Git-ing out of your git messes
KEY
Use git the proper way
PDF
Git Anti-Patterns: How To Mess Up With Git and Love it Again
Git tips
Professional Git 1st Edition Brent Laster
Advanced Git - Functionality and Features
Git presentation bixlabs
Learn Git - For Beginners and Intermediate levels
Git workshop 33degree 2011 krakow
Git of every day
MakingGitWorkForYou
git Behind the Scenes - Daphna Regev
Professional Git 1st Edition Brent Laster
Git training v10
Git - Version Control System
Git tutorial
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Intermediate Git
Advanced Git
Git and Github
Git-ing out of your git messes
Use git the proper way
Git Anti-Patterns: How To Mess Up With Git and Love it Again
Ad

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Introduction to Artificial Intelligence
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Digital Strategies for Manufacturing Companies
PPTX
history of c programming in notes for students .pptx
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
Nekopoi APK 2025 free lastest update
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Upgrade and Innovation Strategies for SAP ERP Customers
Operating system designcfffgfgggggggvggggggggg
CHAPTER 2 - PM Management and IT Context
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Odoo POS Development Services by CandidRoot Solutions
Design an Analysis of Algorithms II-SECS-1021-03
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Introduction to Artificial Intelligence
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Digital Strategies for Manufacturing Companies
history of c programming in notes for students .pptx
How Creative Agencies Leverage Project Management Software.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
PTS Company Brochure 2025 (1).pdf.......

Git Advanced