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)
116 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
We take content rights seriously. If you suspect this is your content,
claim it here
.
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)
116 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
We take content rights seriously. If you suspect this is your content,
claim it here
.
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
Java 17 Backend Development: Design backend systems using Spring Boot, Docker, Kafka, Eureka, Redis, and Tomcat
From Everand
Java 17 Backend Development: Design backend systems using Spring Boot, Docker, Kafka, Eureka, Redis, and Tomcat
Elara Drevyn
No ratings yet
Smartgit Quickstart Guide
PDF
No ratings yet
Smartgit Quickstart Guide
28 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
Git Commands: Getting & Creating Projects
PDF
No ratings yet
Git Commands: Getting & Creating Projects
3 pages
DevOps Chapter 2
PDF
No ratings yet
DevOps Chapter 2
31 pages
11.interview C Coding Question
PDF
No ratings yet
11.interview C Coding Question
7 pages
Continuous Integration Overview: Integrate at Least Daily
PDF
No ratings yet
Continuous Integration Overview: Integrate at Least Daily
12 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 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 Quick Guide
PDF
100% (1)
Git Quick Guide
41 pages
Git GitHub Notes PDF
PDF
No ratings yet
Git GitHub Notes PDF
4 pages
Git Notes
PDF
No ratings yet
Git Notes
8 pages
Git Workshop - PDF Version 1-Rotated
PDF
No ratings yet
Git Workshop - PDF Version 1-Rotated
36 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
Git Cheat Sheet
PDF
100% (1)
Git Cheat Sheet
9 pages
GIT
PDF
No ratings yet
GIT
15 pages
Basic Git Commands - Atlassian Documentation
PDF
No ratings yet
Basic Git Commands - Atlassian Documentation
2 pages
NARESH IT FINAL YEAR PROJECT TITLES - 2010-2011e
PDF
No ratings yet
NARESH IT FINAL YEAR PROJECT TITLES - 2010-2011e
66 pages
50 Jenkins Interview Questions and Answers 2023
PDF
No ratings yet
50 Jenkins Interview Questions and Answers 2023
10 pages
Git Concepts Simplified
PDF
No ratings yet
Git Concepts Simplified
27 pages
GIT Notes
PDF
No ratings yet
GIT Notes
13 pages
Maven Tutorial: Understanding The Problem Without Maven
PDF
No ratings yet
Maven Tutorial: Understanding The Problem Without Maven
29 pages
Java Persistence
PDF
No ratings yet
Java Persistence
296 pages
Top GIT Interview Question
PDF
No ratings yet
Top GIT Interview Question
10 pages
Jenkins L2 Set 2
PDF
100% (1)
Jenkins L2 Set 2
3 pages
Git Branching PDF
PDF
No ratings yet
Git Branching PDF
8 pages
Java 8 Features With Examples
PDF
No ratings yet
Java 8 Features With Examples
6 pages
Notes Git and Github
PDF
No ratings yet
Notes Git and Github
11 pages
01 Version Control
PDF
No ratings yet
01 Version Control
37 pages
GIT Guide: Initial Configuration
PDF
No ratings yet
GIT Guide: Initial Configuration
5 pages
Installing/learning Git
PDF
No ratings yet
Installing/learning Git
17 pages
Maven Notes
PDF
No ratings yet
Maven Notes
45 pages
Maven - Maven in 5 Minutes
PDF
No ratings yet
Maven - Maven in 5 Minutes
5 pages
Top 20 Git Commands With Examples - DZone DevOps
PDF
100% (1)
Top 20 Git Commands With Examples - DZone DevOps
9 pages
Eclipselink 3
PDF
No ratings yet
Eclipselink 3
166 pages
The Heap Size in Weblogic
PDF
No ratings yet
The Heap Size in Weblogic
6 pages
Git Tutorial 2016
PDF
No ratings yet
Git Tutorial 2016
65 pages
Jenkins Git
PDF
No ratings yet
Jenkins Git
7 pages
NareshIT JavaScript CSS3 Training Notes SubbaRaju PDF
PDF
No ratings yet
NareshIT JavaScript CSS3 Training Notes SubbaRaju PDF
148 pages
Git Basics
PDF
No ratings yet
Git Basics
20 pages
Jenkins Pipeline - Intermediate
PDF
No ratings yet
Jenkins Pipeline - Intermediate
97 pages
Git Ointerview Questions
PDF
No ratings yet
Git Ointerview Questions
21 pages
Maven RC Notes
PDF
No ratings yet
Maven RC Notes
6 pages
Maven Notes
PDF
No ratings yet
Maven Notes
11 pages
MongoDB Indexing PDF
PDF
No ratings yet
MongoDB Indexing PDF
3 pages
Jenkins Lab
PDF
100% (1)
Jenkins Lab
41 pages
Git For Devops Study Material
PDF
No ratings yet
Git For Devops Study Material
197 pages
RT Technologies +91-9019995361: Purushotham Reddy
PDF
100% (1)
RT Technologies +91-9019995361: Purushotham Reddy
17 pages
Apache Maven: - Bhavana Sudharshan - Jaydeep Patel
PDF
No ratings yet
Apache Maven: - Bhavana Sudharshan - Jaydeep Patel
18 pages
GIT
PDF
No ratings yet
GIT
23 pages
Git Basic Good
PDF
100% (1)
Git Basic Good
20 pages
Git Cheat Sheet: Working With Branches
PDF
No ratings yet
Git Cheat Sheet: Working With Branches
1 page
UNIX Notes
PDF
No ratings yet
UNIX Notes
4 pages
CI Reveals Integration Issues at A Very Early Stage
PDF
100% (1)
CI Reveals Integration Issues at A Very Early Stage
13 pages
Vikram Kumar Devops Notes: Version - V1.0 Course - Devops Chapter - Bash Scripting
PDF
No ratings yet
Vikram Kumar Devops Notes: Version - V1.0 Course - Devops Chapter - Bash Scripting
24 pages
Case Study - Git
PDF
No ratings yet
Case Study - Git
4 pages
Git Tutorial: Lars Vogel
PDF
No ratings yet
Git Tutorial: Lars Vogel
16 pages
Docker Notes
PDF
No ratings yet
Docker Notes
2 pages
UNIX Shell Scripting With Ksh-Bash
PDF
No ratings yet
UNIX Shell Scripting With Ksh-Bash
56 pages