SlideShare une entreprise Scribd logo
Git
How to revert changes
Git commits
master
Initial
commit
created txt file
with one
message
this is a
second
phrase
modified
phrase to
word
added new
line to txt
HEAD
Git commits
master
Initial
commit
created txt file
with one
message
this is a
second
phrase
modified
phrase to
word
added new
line to txt
HEAD
Git commits
master
Initial
commit
created txt file
with one
message
this is a
second
phrase
modified
phrase to
word
added new
line to txt
HEAD
Git reset (mixed)
master
Initial
commit
created txt file
with one
message
this is a
second
phrase
modified
phrase to
word
added new
line to txt
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
Git reset (mixed)
master
Initial
commit
created txt file
with one
message
this is a
second
phrase
modified
phrase to
word
added new
line to txt
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
Command: git reset 3501314
UNSTAGED
Git reset (mixed)
master
Initial
commit
created txt file
with one
message
this is a
second
phrase
modified
phrase to
word
added new
line to txt
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
Git reset (mixed)
master
Initial
commit
created txt file
with one
message
this is a
second
phrase
modified
phrase to
word
added new
line to txt
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
Git reset (hard)
master
Initial
commit
created txt file
with one
message
this is a
second
phrase
modified
phrase to
word
added new
line to txt
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
Git reset (hard)
master
Initial
commit
created txt file
with one
message
this is a
second
phrase
modified
phrase to
word
added new
line to txt
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
Command: git reset --hard 3501314
DELETED
Git reset origin
master
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
origin/master
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
Git reset origin
master
HEAD
fe2a19c 2dd0996 3501314
origin/master
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
Command: git reset --hard 3501314
Git reset origin
master
HEAD
fe2a19c 2dd0996 3501314
origin/master
HEAD
fe2a19c 2dd0996 3501314
git push origin master --force
Git revert
master
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
origin/master
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
Git revert
master
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
origin/master
HEAD
fe2a19c 2dd0996 3501314 aef4fa3 397381d
459dfes
Command: git revert 3501314

Contenu connexe

Similaire à Git - How to revert changes

Git real slides
Git real slidesGit real slides
Git real slides
Lucas Couto
 
Git_real_slides
Git_real_slidesGit_real_slides
Git_real_slides
Khanh NL-bantoilatoi
 
Git: Overview, Pitfalls, Best Practices
Git: Overview, Pitfalls, Best PracticesGit: Overview, Pitfalls, Best Practices
Git: Overview, Pitfalls, Best Practices
Jeremy Leisy
 
Keep your GIT history clean
Keep your GIT history cleanKeep your GIT history clean
Keep your GIT history clean
tomasbro
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
Jason Byrne
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHub
Lucas Videla
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
bryanbibat
 
Git SCM
Git SCMGit SCM
Git-ing out of your git messes - Fluent Conf 2017
Git-ing out of  your git messes - Fluent Conf 2017Git-ing out of  your git messes - Fluent Conf 2017
Git-ing out of your git messes - Fluent Conf 2017
Katie Sylor-Miller
 
git command
git commandgit command
git command
LearningTech
 
Git rewriting git history
Git   rewriting git  historyGit   rewriting git  history
Git rewriting git history
LearningTech
 
Git like a pro EDD18 - Full edition
Git like a pro EDD18 - Full editionGit like a pro EDD18 - Full edition
Git like a pro EDD18 - Full edition
Jesús Miguel Benito Calzada
 
Git commands
Git commandsGit commands
Git commands
Javed Hussain
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
Anuchit Chalothorn
 
Git
GitGit
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
Rasan Samarasinghe
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
Terry Wang
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Aleksey Asiutin
 
Linux GIT commands
Linux GIT commandsLinux GIT commands
Linux GIT commands
RajKumar Rampelli
 

Similaire à Git - How to revert changes (20)

Git real slides
Git real slidesGit real slides
Git real slides
 
Git_real_slides
Git_real_slidesGit_real_slides
Git_real_slides
 
Git: Overview, Pitfalls, Best Practices
Git: Overview, Pitfalls, Best PracticesGit: Overview, Pitfalls, Best Practices
Git: Overview, Pitfalls, Best Practices
 
Keep your GIT history clean
Keep your GIT history cleanKeep your GIT history clean
Keep your GIT history clean
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHub
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
 
Git SCM
Git SCMGit SCM
Git SCM
 
Git-ing out of your git messes - Fluent Conf 2017
Git-ing out of  your git messes - Fluent Conf 2017Git-ing out of  your git messes - Fluent Conf 2017
Git-ing out of your git messes - Fluent Conf 2017
 
git command
git commandgit command
git command
 
Git rewriting git history
Git   rewriting git  historyGit   rewriting git  history
Git rewriting git history
 
Git like a pro EDD18 - Full edition
Git like a pro EDD18 - Full editionGit like a pro EDD18 - Full edition
Git like a pro EDD18 - Full edition
 
Git commands
Git commandsGit commands
Git commands
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
 
Git
GitGit
Git
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Linux GIT commands
Linux GIT commandsLinux GIT commands
Linux GIT commands
 

Plus de artembondar5

TestRigor - using of coordinates - Bondar Academy
TestRigor - using of coordinates - Bondar AcademyTestRigor - using of coordinates - Bondar Academy
TestRigor - using of coordinates - Bondar Academy
artembondar5
 
TestRigor - Element Location Rules - Bondar Academy
TestRigor - Element Location Rules - Bondar AcademyTestRigor - Element Location Rules - Bondar Academy
TestRigor - Element Location Rules - Bondar Academy
artembondar5
 
TestRigor - What is API - Bondar Academy
TestRigor - What is API - Bondar AcademyTestRigor - What is API - Bondar Academy
TestRigor - What is API - Bondar Academy
artembondar5
 
Understanding HTML Dom Terminology Playwright course
Understanding HTML Dom Terminology Playwright courseUnderstanding HTML Dom Terminology Playwright course
Understanding HTML Dom Terminology Playwright course
artembondar5
 
PageObjectModel
PageObjectModelPageObjectModel
PageObjectModel
artembondar5
 
Playwright Retries
Playwright RetriesPlaywright Retries
Playwright Retries
artembondar5
 
ArchitectureOverview
ArchitectureOverviewArchitectureOverview
ArchitectureOverview
artembondar5
 
Git Source Control Management
Git Source Control ManagementGit Source Control Management
Git Source Control Management
artembondar5
 
What is API
What is APIWhat is API
What is API
artembondar5
 

Plus de artembondar5 (9)

TestRigor - using of coordinates - Bondar Academy
TestRigor - using of coordinates - Bondar AcademyTestRigor - using of coordinates - Bondar Academy
TestRigor - using of coordinates - Bondar Academy
 
TestRigor - Element Location Rules - Bondar Academy
TestRigor - Element Location Rules - Bondar AcademyTestRigor - Element Location Rules - Bondar Academy
TestRigor - Element Location Rules - Bondar Academy
 
TestRigor - What is API - Bondar Academy
TestRigor - What is API - Bondar AcademyTestRigor - What is API - Bondar Academy
TestRigor - What is API - Bondar Academy
 
Understanding HTML Dom Terminology Playwright course
Understanding HTML Dom Terminology Playwright courseUnderstanding HTML Dom Terminology Playwright course
Understanding HTML Dom Terminology Playwright course
 
PageObjectModel
PageObjectModelPageObjectModel
PageObjectModel
 
Playwright Retries
Playwright RetriesPlaywright Retries
Playwright Retries
 
ArchitectureOverview
ArchitectureOverviewArchitectureOverview
ArchitectureOverview
 
Git Source Control Management
Git Source Control ManagementGit Source Control Management
Git Source Control Management
 
What is API
What is APIWhat is API
What is API
 

Dernier

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 

Dernier (20)

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 

Git - How to revert changes