Тёмный

How to Undo a Pushed Git Commit - Reset & Revert a Git Commit After Push 

Cameron McKenzie
Подписаться 22 тыс.
Просмотров 15 тыс.
50% 1

Опубликовано:

 

7 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 48   
@readmyheart
@readmyheart Месяц назад
that intro... this guy's about to save my life. thanks in advance!
@cameronmcnz
@cameronmcnz Месяц назад
Nobody gets out alive, I'm afraid. Thanks for watching and commenting!
@ChiragYadav-w1d
@ChiragYadav-w1d 4 месяца назад
Don't think there will be any other video which will explain it much better than you sir. Thank you
@cameronmcnz
@cameronmcnz 27 дней назад
Thanks so much for the kind words!
@jeetendranavgikar6384
@jeetendranavgikar6384 4 месяца назад
After watching so many videos for the solution. this video got it right. thank you
@cameronmcnz
@cameronmcnz 4 месяца назад
Why would you watch someone else's video? Happy to help!
@kevindichter
@kevindichter 3 дня назад
You're a lifesaver! I thought I lost so much progress!
@shawnbunch4872
@shawnbunch4872 5 месяцев назад
Clear, concise, and straight to the point. 🐐
@cameronmcnz
@cameronmcnz 5 месяцев назад
I do try my best to cover what's important. Nobody seems to want to hear my opinions on middle-east politics in these Git videos, it seems.
@pravinprince3221
@pravinprince3221 7 месяцев назад
Thank you sir it is one of the best video in the Git series, it is so helpful to many of us sir, thanks again sir
@cameronmcnz
@cameronmcnz 7 месяцев назад
First comment! Thanks for the support. Every comment and like really helps out. It boosts the algo and helps get the videos in front of more people.
@Spyros.Charalambous
@Spyros.Charalambous 6 месяцев назад
It's the most simplified video ever! thank you so much for your time!!!
@cameronmcnz
@cameronmcnz 6 месяцев назад
Thanks for the kind words! And given the two different options and the implications of each, I'd say it's anything but simple. If you think it's simple, that's a reflection of the fact that you're smarter than the average bear. 👍
@samhkwest
@samhkwest 5 месяцев назад
Thanks for your demonstration. I've just used this tricks to fix a code merges issue for my work.
@cameronmcnz
@cameronmcnz 5 месяцев назад
Happy to have helped. Nothing worse than thinking you Git pushed something you shouldn't have and you're worried you've broken the build!
@joshlindsay87
@joshlindsay87 Месяц назад
Thank you. Best video I found which helped be roll back some AI destruction.
@cameronmcnz
@cameronmcnz Месяц назад
Rolling back AI destruction is basically half of my job these days. Glad I could help!
@ABDUL-REHMAN345
@ABDUL-REHMAN345 5 месяцев назад
Thankyou so much sir ! i'm watching a lot of video's but i don't understand....finally seeing your video and i will understand♥♥
@cameronmcnz
@cameronmcnz 5 месяцев назад
Thanks for watching! Honestly, once you get pulls, pushes and commits all under your belt, there's really not much more to being a true Git expert!
@tencebakpao4820
@tencebakpao4820 19 дней назад
You are a hero! It worked like a charm
@vodka7924
@vodka7924 6 месяцев назад
You are a life saver sir, Thank you!!!
@cameronmcnz
@cameronmcnz 6 месяцев назад
Happy to help!
@amalkrishnas1696
@amalkrishnas1696 2 месяца назад
thank you, great video
@TheIguana3d
@TheIguana3d Месяц назад
You help me a lot, thank you so much!
@utuberyder
@utuberyder 3 месяца назад
Perfect one.
@cameronmcnz
@cameronmcnz 3 месяца назад
Always happy the help. Thanks for watching!
@abujayed8999
@abujayed8999 5 месяцев назад
tnx, life saving.
@cameronmcnz
@cameronmcnz 5 месяцев назад
Meh, being a great dev means knowing how to find answers to your problems. You found it. You saved yourself. All I did was record a video.
@keifer7813
@keifer7813 3 месяца назад
You're born to teach, man. Quick question though: What if the bad commit was the first and only commit? Then there's no commit hash before it to "git reset" to. Or is it still possible somehow? 🤔
@mytube2581
@mytube2581 27 дней назад
Thanks
@cameronmcnz
@cameronmcnz 27 дней назад
Wow! I'm always here to help, and for you, twice as much!
@justin9494
@justin9494 6 месяцев назад
thank you so much!
@cameronmcnz
@cameronmcnz 6 месяцев назад
Happy to help! Which approach did you take? Revert the pushed commit or reset it?
@justin9494
@justin9494 6 месяцев назад
@@cameronmcnz kind of a bummer because I skipped the intro and didn't know there was a git revert after I've done git reset. I wanted to grab the code that didnt break my app but well, my fault for skipping. Thanks!
@cameronmcnz
@cameronmcnz 6 месяцев назад
@@justin9494 locally you can still find the orphaned commit created by the reset with the reflog command. Ten reset back to that and then do a revert. A lot of with though if what you’ve got works. Maybe I should make the intros shorter?
@Snowdennnn01
@Snowdennnn01 5 месяцев назад
thanks. your video really helped me
@cesarmta87
@cesarmta87 5 месяцев назад
Thank you!!!
@tamaritah2405
@tamaritah2405 Месяц назад
Thank you for that very good video. I did as you show but some of my new file sty when I revert to an older commit. why?
@cameronmcnz
@cameronmcnz Месяц назад
When you revert an older commit, only the files that were part of that specific commit are 'rolled back.' And if it was just a file change, not a file creation or deletion, the file remains with just the changes inside of it rolled back. To take your entire workspace back to where it was 3 or 4 commits ago, you'd want to do a hard reset. Just be careful with a reset as it will mess up the repository if it's shared with others. If it's your own repo that's not shared, reset away!
@tamaritah2405
@tamaritah2405 Месяц назад
@@cameronmcnz thank you
@sagar.sreepuram1960
@sagar.sreepuram1960 6 месяцев назад
How to undo commit if we committ before push and get an error
@cameronmcnz
@cameronmcnz 6 месяцев назад
You can run into so many different scenarios. What's the error? I've probably run into it.
@rosaal9030
@rosaal9030 3 месяца назад
Sir can you please help me i use azuredev and I did revert from there and after that i go to visual studio code and I did git revert then again i did push . I mean i push the unwanted commit again what should I do
@spacetabs
@spacetabs 2 месяца назад
Using git reset with push -f (force) without understanding what you are doing, extremely bad things will happen.
@pclovers219
@pclovers219 5 месяцев назад
Sir when i pass the command git revert (commit id ) of any previous 3 or 4 commit it give me a merge conflict and in it there is a (current code ) but after ======== in the file there is nothing, no incoming change what can i do to go back to my previous state? Hope so you understand my problem 😂
@lolitaad19
@lolitaad19 2 месяца назад
Thank you very much 🙏
@mickey008ful
@mickey008ful 4 месяца назад
Thank you a lot!
Далее
Power Apps Model Driven Apps FULL COURSE for Beginners
3:23:34
Changing The Flag Of The Countries #countryballs
00:18
So You Think You Know Git - FOSDEM 2024
47:00
Просмотров 1,1 млн
Git revert vs reset: What's the difference?
8:15
Просмотров 5 тыс.
The intro to Docker I wish I had when I started
18:27
Просмотров 139 тыс.
Beginner Git commands you need to know (WITH EXAMPLES)
14:28
The Problem With Microservices
17:47
Просмотров 434 тыс.
How to Generate GitHub SSH Keys
19:15
Просмотров 12 тыс.
How GIT works under the HOOD?
16:01
Просмотров 199 тыс.