Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Undo, Redo, Change History with Git
Search
Joshua Wehner
January 28, 2015
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Undo, Redo, Change History with Git
Undo, Redo and Change History with Git
Joshua Wehner
January 28, 2015
More Decks by Joshua Wehner
See All by Joshua Wehner
How to Undo Almost* Anything in Git
jaw6
0
120
Must It Always Be About Sex?
jaw6
2
200
Other Decks in Programming
See All in Programming
Crash Auto Pipelines
veronikapj
1
140
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.9k
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
140
AmebaブログはKMPから卒業します
kmars0605
0
310
ActionController meets Protocol Buffers
sorah
1
750
SODA - FACT BOOK(EN)
sodainc
1
190
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.6k
気持ちぃ〜角丸 Squircle
ryu1013
0
370
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
200
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
120
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
230
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
220
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Practical Orchestrator
shlominoach
192
12k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
770
WCS-LA-2024
lcolladotor
0
940
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
490
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
390
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
320
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Transcript
Undo, Redo Change History with Git
Joshua Wehner • @jaw6 •
[email protected]
• Minneapolis, MN, USA
• GitHub Training
Undo & Redo Scenarios
Undo "Public" Change • It's broken • But it's pushed
• git revert <sha>
Tweak Last Commit • Oooops • Committed too fast •
git commit --amend
Regrets, I've Had a Few • Ooooops • That's mostly
rubbish • git reset <last good sha>
Throw It All Away • It's all rubbish • I
regret everything • git reset --hard <last good sha>
Wait, On Second Thought • Throw It All Away •
Could I maybe get that back? • git reflog git reset --hard <sha>
Well, That Wasn't So Bad • Most of that is
trash • But that one? That one is good. • Gimme. • git cherry-pick <good one>
Put That Thing Over There • I should have made
this branch earlier • Those commits should not be on master • git rebase master
None
None
Well, Then Again • Throw It All Some of It
Away • I regret that one thing • Some of the rest of it was okay • git rebase -i <public sha>
I Was Wrong Before • I thought I was wrong
• But I wasn't • git commit --fixup <sha> git rebase -i --autosquash
Forget I Said That • Stop tracking this file •
I mean it • git rm --cached .gitignore git clean -f (also -x maybe?)
Thank you! Undo, Redo, Change History • @jaw6 •
[email protected]
• http://training.github.com/
I'm Only (Sort of) Kidding • Commit part (just part)
of a file • git add -p