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)
139 views
9 pages
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
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)
139 views
9 pages
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
Carousel Previous
Carousel Next
Download
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
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 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
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 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 Concepts Simplified
PDF
No ratings yet
Git Concepts Simplified
27 pages
Basic Git Commands - Atlassian Documentation
PDF
No ratings yet
Basic Git Commands - Atlassian Documentation
2 pages
GIT Guide: Initial Configuration
PDF
No ratings yet
GIT Guide: Initial Configuration
5 pages
01 Version Control
PDF
No ratings yet
01 Version Control
37 pages
Important GIT Commands by Naveen AutomationLabs 1670831428
PDF
No ratings yet
Important GIT Commands by Naveen AutomationLabs 1670831428
7 pages
Introduction To Version Control With Git: Originally by Andreas Skielboe
PDF
100% (2)
Introduction To Version Control With Git: Originally by Andreas Skielboe
31 pages
Git Basic Usage Installation
PDF
No ratings yet
Git Basic Usage Installation
3 pages
11.interview C Coding Question
PDF
No ratings yet
11.interview C Coding Question
7 pages
Linux Intro
PDF
No ratings yet
Linux Intro
40 pages
Maven RC Notes
PDF
No ratings yet
Maven RC Notes
6 pages
Git GitHub Notes PDF
PDF
No ratings yet
Git GitHub Notes PDF
4 pages
Git Notes
PDF
No ratings yet
Git Notes
91 pages
Setting Up A Repository: Git Init
PDF
100% (1)
Setting Up A Repository: Git Init
11 pages
Intro To Git: How To Work Together Without Hating Each Others' Guts
PDF
No ratings yet
Intro To Git: How To Work Together Without Hating Each Others' Guts
18 pages
Java Persistence
PDF
No ratings yet
Java Persistence
296 pages
GIT
PDF
No ratings yet
GIT
15 pages
Atlassian Git Cheatsheet PDF
PDF
100% (1)
Atlassian Git Cheatsheet PDF
2 pages
Maven Tutorial: Understanding The Problem Without Maven
PDF
No ratings yet
Maven Tutorial: Understanding The Problem Without Maven
29 pages
E-Commerce Application - Angular Front-End and Spring Boot Back-End
PDF
No ratings yet
E-Commerce Application - Angular Front-End and Spring Boot Back-End
2 pages
Git Quick Guide
PDF
100% (1)
Git Quick Guide
41 pages
Case Study - Git
PDF
No ratings yet
Case Study - Git
4 pages
BA Jira Think2change
PDF
No ratings yet
BA Jira Think2change
24 pages
MongoDB Indexing PDF
PDF
No ratings yet
MongoDB Indexing PDF
3 pages
UNIX Shell Scripting With Ksh-Bash
PDF
No ratings yet
UNIX Shell Scripting With Ksh-Bash
56 pages
Version Control With Git
PDF
No ratings yet
Version Control With Git
25 pages
Code Repository Tool (Version Management) : Git Process
PDF
100% (1)
Code Repository Tool (Version Management) : Git Process
22 pages
Manish Angular Notes
PDF
No ratings yet
Manish Angular Notes
14 pages
Spring-Hibernate-naresh Inst PDF
PDF
No ratings yet
Spring-Hibernate-naresh Inst PDF
472 pages
Git Branching PDF
PDF
No ratings yet
Git Branching PDF
8 pages
Java Interview Questions For 2 Years Experienced
PDF
No ratings yet
Java Interview Questions For 2 Years Experienced
8 pages
NARESH IT FINAL YEAR PROJECT TITLES - 2010-2011e
PDF
No ratings yet
NARESH IT FINAL YEAR PROJECT TITLES - 2010-2011e
66 pages
1.1 Private Methods in Interfaces PDF
PDF
No ratings yet
1.1 Private Methods in Interfaces PDF
7 pages
Git Tutorial: Lars Vogel
PDF
No ratings yet
Git Tutorial: Lars Vogel
16 pages
Downloads - Introduction To Redux
PDF
No ratings yet
Downloads - Introduction To Redux
33 pages
Best Practices For Using Git
PDF
No ratings yet
Best Practices For Using Git
2 pages
How To Use Git
PDF
No ratings yet
How To Use Git
15 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 & Github Cheatsheet
PDF
100% (1)
Git & Github Cheatsheet
18 pages
Git Ointerview Questions
PDF
No ratings yet
Git Ointerview Questions
21 pages
Git Commands
PDF
No ratings yet
Git Commands
3 pages
Dot Net
PDF
No ratings yet
Dot Net
9 pages
1.1 JShell PDF
PDF
100% (1)
1.1 JShell PDF
49 pages
Git Basic Commands
PDF
No ratings yet
Git Basic Commands
27 pages
Question Bank
PDF
100% (1)
Question Bank
4 pages
Need of Log4J
PDF
No ratings yet
Need of Log4J
20 pages
Common Git Commands
PDF
No ratings yet
Common Git Commands
9 pages
Learning SaltStack - Second Edition
From Everand
Learning SaltStack - Second Edition
Colton Myers
No ratings yet
Kubernetes A Complete Guide
From Everand
Kubernetes A Complete Guide
Gerardus Blokdyk
No ratings yet
Mastering Apache Cassandra - Second Edition
From Everand
Mastering Apache Cassandra - Second Edition
Nishant Neeraj
No ratings yet
Ultimate Microsoft Intune for Administrators: Master Enterprise Endpoint Security and Manage Devices, Apps, and Cloud Security with Expert Microsoft Intune Strategies (English Edition)
From Everand
Ultimate Microsoft Intune for Administrators: Master Enterprise Endpoint Security and Manage Devices, Apps, and Cloud Security with Expert Microsoft Intune Strategies (English Edition)
Paul Winstanley
No ratings yet
Git Cheat Sheet
PDF
No ratings yet
Git Cheat Sheet
13 pages
Git Cheat Sheet
PDF
No ratings yet
Git Cheat Sheet
9 pages