Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
111 views
Advanced Git Commands
This document discusses various advanced Git commands for reverting changes, showing commit diffs, keeping Git history linear, squashing commits, saving the working directory, cherry-picking changes, and cleaning untracked and ignored files. Commands covered include git revert, git reset, git diff, git show, git rebase, git stash, git cherry-pick, and git clean.
Uploaded by
Daniel F Jaramillo
AI-enhanced description
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download now
Download
Save Advanced Git Commands For Later
Download
Save
Save Advanced Git Commands For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
111 views
Advanced Git Commands
This document discusses various advanced Git commands for reverting changes, showing commit diffs, keeping Git history linear, squashing commits, saving the working directory, cherry-picking changes, and cleaning untracked and ignored files. Commands covered include git revert, git reset, git diff, git show, git rebase, git stash, git cherry-pick, and git clean.
Uploaded by
Daniel F Jaramillo
AI-enhanced description
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download now
Download
Save Advanced Git Commands For Later
Carousel Previous
Carousel Next
Save
Save Advanced Git Commands For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 9
Search
Fullscreen
Git Advanced
Commands
Revert Changes - Revert
git revert <hash>
git revert --no-commit <hash>
git revert HEAD~2..HEAD
git revert -m <1,2> <hash>
Revert Changes - Reset
git reset --soft HEAD~1
git reset --hard HEAD~1
git reset --hard HEAD
git reset --hard origin/main
Showing commits diff
git diff <hash>~ <hash>
git show <hash>
Keeping the git history linear
git rebase <branch>
Squashing commits
git reset --soft HEAD~3 && git commit
git rebase -i HEAD~3
Saving the working directory
git stash
git stash pop
git stash list
Cherry-picking changes
git cherry-pick <commitSha>
Bonus, cleaning untracked and ignored files
git clean -dxf
You might also like
Smartgit Quickstart Guide
PDF
No ratings yet
Smartgit Quickstart Guide
28 pages
1 Devops and Git in A Nutshell
PDF
No ratings yet
1 Devops and Git in A Nutshell
30 pages
C5050-062 Urbancode Deploy
PDF
100% (1)
C5050-062 Urbancode Deploy
30 pages
Atlassian Git Cheatsheet PDF
PDF
No ratings yet
Atlassian Git Cheatsheet PDF
2 pages
Best Way To Use Git Commands
PDF
No ratings yet
Best Way To Use Git Commands
4 pages
DevOps Chapter 2
PDF
No ratings yet
DevOps Chapter 2
31 pages
Git Commands: Getting & Creating Projects
PDF
No ratings yet
Git Commands: Getting & Creating Projects
3 pages
Git Workflows: Sylvain Bouveret, Grégory Mounié, Matthieu Moy 2017
PDF
No ratings yet
Git Workflows: Sylvain Bouveret, Grégory Mounié, Matthieu Moy 2017
23 pages
Git Basic Usage Installation
PDF
No ratings yet
Git Basic Usage Installation
3 pages
Eclipselink 3
PDF
No ratings yet
Eclipselink 3
166 pages
11.interview C Coding Question
PDF
No ratings yet
11.interview C Coding Question
7 pages
Git Concepts Simplified
PDF
No ratings yet
Git Concepts Simplified
27 pages
GIT Guide: Initial Configuration
PDF
No ratings yet
GIT Guide: Initial Configuration
5 pages
Git Workshop - PDF Version 1-Rotated
PDF
No ratings yet
Git Workshop - PDF Version 1-Rotated
36 pages
Java 8 Features With Examples
PDF
No ratings yet
Java 8 Features With Examples
6 pages
Git - Github
PDF
No ratings yet
Git - Github
29 pages
Git Tutorial: Lars Vogel
PDF
No ratings yet
Git Tutorial: Lars Vogel
16 pages
GIT
PDF
No ratings yet
GIT
15 pages
Git Cheat Sheet
PDF
100% (1)
Git Cheat Sheet
9 pages
Git Basics: Version Control Where Clients Must Synchronize Code With A Server Before Creating New Versions of Code
PDF
No ratings yet
Git Basics: Version Control Where Clients Must Synchronize Code With A Server Before Creating New Versions of Code
5 pages
Git Branching PDF
PDF
No ratings yet
Git Branching PDF
8 pages
Basic Git Commands - Atlassian Documentation
PDF
No ratings yet
Basic Git Commands - Atlassian Documentation
2 pages
Continuous Integration Overview: Integrate at Least Daily
PDF
No ratings yet
Continuous Integration Overview: Integrate at Least Daily
12 pages
Notes Git and Github
PDF
No ratings yet
Notes Git and Github
11 pages
NARESH IT FINAL YEAR PROJECT TITLES - 2010-2011e
PDF
No ratings yet
NARESH IT FINAL YEAR PROJECT TITLES - 2010-2011e
66 pages
Case Study - Git
PDF
No ratings yet
Case Study - Git
4 pages
Git Quick Guide
PDF
100% (1)
Git Quick Guide
41 pages
Git Notes
PDF
No ratings yet
Git Notes
8 pages
01 Version Control
PDF
No ratings yet
01 Version Control
37 pages
50 Jenkins Interview Questions and Answers 2023
PDF
No ratings yet
50 Jenkins Interview Questions and Answers 2023
10 pages
GIT Notes
PDF
No ratings yet
GIT Notes
13 pages
8 Useful But Not Well-Known Git Concepts: Checkout Cherry-Pick
PDF
No ratings yet
8 Useful But Not Well-Known Git Concepts: Checkout Cherry-Pick
5 pages
Maven Tutorial: Understanding The Problem Without Maven
PDF
No ratings yet
Maven Tutorial: Understanding The Problem Without Maven
29 pages
Top 20 Git Commands With Examples - DZone DevOps
PDF
100% (1)
Top 20 Git Commands With Examples - DZone DevOps
9 pages
MongoDB Indexing PDF
PDF
No ratings yet
MongoDB Indexing PDF
3 pages
Best Practices For Using Git
PDF
No ratings yet
Best Practices For Using Git
2 pages
Git Notes
PDF
No ratings yet
Git Notes
3 pages
Setting Up A Repository: Git Init
PDF
No ratings yet
Setting Up A Repository: Git Init
11 pages
Spring-Hibernate-naresh Inst PDF
PDF
No ratings yet
Spring-Hibernate-naresh Inst PDF
472 pages
Jenkins L2 Set 2
PDF
100% (1)
Jenkins L2 Set 2
3 pages
Ethans-Prakash 1
PDF
No ratings yet
Ethans-Prakash 1
37 pages
Java Persistence
PDF
No ratings yet
Java Persistence
296 pages
Basic GIT Commands: Understanding The GIT Workflow
PDF
No ratings yet
Basic GIT Commands: Understanding The GIT Workflow
6 pages
Git Cheat Sheet: Working With Branches
PDF
No ratings yet
Git Cheat Sheet: Working With Branches
1 page
Git Best Practises
PDF
No ratings yet
Git Best Practises
14 pages
J2EE Best Practices
PDF
No ratings yet
J2EE Best Practices
98 pages
Git Basic Commands
PDF
No ratings yet
Git Basic Commands
27 pages
Maven - Maven in 5 Minutes
PDF
No ratings yet
Maven - Maven in 5 Minutes
5 pages
Maven Notes
PDF
No ratings yet
Maven Notes
11 pages
Maven RC Notes
PDF
No ratings yet
Maven RC Notes
6 pages
1.1 JShell PDF
PDF
No ratings yet
1.1 JShell PDF
49 pages
Log4J - PDF - Java Platform - Software
PDF
No ratings yet
Log4J - PDF - Java Platform - Software
32 pages
Docker Interview Questions
PDF
No ratings yet
Docker Interview Questions
4 pages
A Perfect Place For All Resources
PDF
No ratings yet
A Perfect Place For All Resources
98 pages
JSP Complete Notes
PDF
No ratings yet
JSP Complete Notes
153 pages
The Heap Size in Weblogic
PDF
No ratings yet
The Heap Size in Weblogic
6 pages
Need of Log4J
PDF
No ratings yet
Need of Log4J
20 pages
GemFire Introduction Hands-On Labs
PDF
No ratings yet
GemFire Introduction Hands-On Labs
19 pages
The Complete Spring Boot: A Comprehensive Guide to Modern Java Applications
From Everand
The Complete Spring Boot: A Comprehensive Guide to Modern Java Applications
Aarav Joshi
No ratings yet
DRBD-Cookbook: How to create your own cluster solution, without SAN or NAS!
From Everand
DRBD-Cookbook: How to create your own cluster solution, without SAN or NAS!
Joerg Christian Seubert
No ratings yet