Undo last commit 🪄

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

"all the commands" is actually just one,
`git reset HEAD~1`. Your commit is undone, and you don't lose all the other work you did
(To also drop the changes, ontop of undoing the commit, add the `--hard` flag)

Alex-ckin
Автор

Damn, I thought this can help undo me committing tax fraud.

Apollo
Автор

Many solutions : git amend
Git rebase - i
Git reset -<option>
Create another commit and fixup the older

RoyJoachimMurat
Автор

How is that different from "git reset HEAD~" which is also one command?

mateuszbugaj
Автор

Three ways you can do ghat
1. Git checkout
2. Git revert
3. Git reset

naveedalirehmani
Автор

Good. Now give me "undo last push -f".

PhilipAlexanderHassialis
Автор

This has saved me many times. I use this over git commit --amend too 😂

aniruddharao
Автор

vs codes trying ta be hip with the kids. LMAO a tiktok (mad respect)

harryherzberg
Автор

You couldn't have uploaded this 3 hours ago? ugh! Still, great tip and great video

eccentricOrange
Автор

Now that's productivity at work. Thanks guys ☺️

AbrahamSamma
Автор

Actually it is just a git reset command, I suggest reading git documentation before using all these tools.

sam
Автор

Fix the goddammn default terminal. Powershell is always opened, not the default one I've set. This bug is so damn annoying.

ccrsxx
Автор

git log
Then git revert with the most recent commit's ID. Also great if you don't want to remember a lot of things, I use this to revert any commit not just the last one.

nourgaser
Автор

Wht i can't save this videos to watch them later?

diegonimo
Автор

Thanks, useful thing!
There should be some text in small font "when you pushed to remote repo, it is too late to undo commits".

caujka
Автор

What if I had pushed that commit to remote also? Is there any way to revert that please?

HendersonHarrisson
Автор

Why is no one talking about the React with no JSX?🧐🧐🧐

filip
Автор

My way would be to use the file history and copy it over and commit it.

yokowasis
Автор

That‘s cool and all but please for the love of god just learn how to use git on cli instead of relying on text editors and gui

bigkunt