It's the most simplified video ever! thank you so much for your time!!!
@cameronmcnz9 ай бұрын
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. 👍
@Lucy-m9b3yАй бұрын
Thank you so much for explaining git push --force, I couldn't work out why my git reset --hard wouldn't work until watching this video!
@cameronmcnzАй бұрын
You are most welcome. And thanks for watching. May the force be with you.
@readmyheart5 ай бұрын
that intro... this guy's about to save my life. thanks in advance!
@cameronmcnz5 ай бұрын
Nobody gets out alive, I'm afraid. Thanks for watching and commenting!
@jeetendranavgikar63848 ай бұрын
After watching so many videos for the solution. this video got it right. thank you
@cameronmcnz8 ай бұрын
Why would you watch someone else's video? Happy to help!
@matk2283Ай бұрын
Amazingly Brilliant explanation on git reset and git revert, and the difference between the two. my gratitude to you. much appreciated !! Mathew. K from Colorado
@cameronmcnzАй бұрын
Thanks for the kind words! Lots of pitfalls in the world of reset and revert. Glad I was able to make a confusing topic make sense to you!
@pravinprince322110 ай бұрын
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
@cameronmcnz10 ай бұрын
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.
@Shahroze_2 ай бұрын
Genuinely the best video I've watched for this scenario. Appreciate it!
@cameronmcnz2 ай бұрын
Thanks for the kind words! The task is a lot more complicated than it appears on the surface. I'm glad I made the task make a bit of sense to you!
@shawnbunch48728 ай бұрын
Clear, concise, and straight to the point. 🐐
@cameronmcnz8 ай бұрын
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.
@vodka79249 ай бұрын
You are a life saver sir, Thank you!!!
@cameronmcnz9 ай бұрын
Happy to help!
@kevindichter3 ай бұрын
You're a lifesaver! I thought I lost so much progress!
@mallenkb2 ай бұрын
You really saved me soo much time. Thank you
@cameronmcnz2 ай бұрын
Being a great dev is all about being able to find answers to your questions. You found the answer, you saved yourself. I just made a silly KZbin video. All the praise goes to you.
@ChiragYadav-w1d8 ай бұрын
Don't think there will be any other video which will explain it much better than you sir. Thank you
@cameronmcnz4 ай бұрын
Thanks so much for the kind words!
@mytube25814 ай бұрын
Thanks
@cameronmcnz4 ай бұрын
Wow! I'm always here to help, and for you, twice as much!
@samhkwest8 ай бұрын
Thanks for your demonstration. I've just used this tricks to fix a code merges issue for my work.
@cameronmcnz8 ай бұрын
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!
@mrjath4604Ай бұрын
Thank you so much, you explained everything in a simple way.
@maurolimaok11 сағат бұрын
Nice channel. I'm learning to code at Odin Project, and all this videos will be very useful Thanks, a lot.
@tencebakpao48203 ай бұрын
You are a hero! It worked like a charm
@ChanceTEKАй бұрын
Invaluable info. Thank you.
@cameronmcnzАй бұрын
You gotta do this the right way or you're in trouble.
@ABDUL-REHMAN3459 ай бұрын
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♥♥
@cameronmcnz8 ай бұрын
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!
@joshlindsay874 ай бұрын
Thank you. Best video I found which helped be roll back some AI destruction.
@cameronmcnz4 ай бұрын
Rolling back AI destruction is basically half of my job these days. Glad I could help!
@keifer78136 ай бұрын
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? 🤔
@TheIguana3d4 ай бұрын
You help me a lot, thank you so much!
@tamaritah24054 ай бұрын
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?
@cameronmcnz4 ай бұрын
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!
@tamaritah24054 ай бұрын
@@cameronmcnz thank you
@abdel-khafid10 күн бұрын
Great video ! Thanks !
@cameronmcnz10 күн бұрын
Happy to help! Have great 2025!
@xr_xharprazoraxtra542821 сағат бұрын
instead of using comand prompts or terminals, how to do it on the Github Website ?
@amalkrishnas16966 ай бұрын
thank you, great video
@Snowdennnn019 ай бұрын
thanks. your video really helped me
@rosaal90306 ай бұрын
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
@pclovers2199 ай бұрын
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 😂
@sagar.sreepuram196010 ай бұрын
How to undo commit if we committ before push and get an error
@cameronmcnz9 ай бұрын
You can run into so many different scenarios. What's the error? I've probably run into it.
@justin94949 ай бұрын
thank you so much!
@cameronmcnz9 ай бұрын
Happy to help! Which approach did you take? Revert the pushed commit or reset it?
@justin94949 ай бұрын
@@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!
@cameronmcnz9 ай бұрын
@@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?
@utuberyder6 ай бұрын
Perfect one.
@cameronmcnz6 ай бұрын
Always happy the help. Thanks for watching!
@abujayed-dot-com8 ай бұрын
tnx, life saving.
@cameronmcnz8 ай бұрын
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.
@gnmlnaАй бұрын
Thank you!
@cesarmta878 ай бұрын
Thank you!!!
@thakurj647Ай бұрын
Too good.
@spacetabs5 ай бұрын
Using git reset with push -f (force) without understanding what you are doing, extremely bad things will happen.