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!
@cameronmcnz24 күн бұрын
You are most welcome. And thanks for watching. May the force be with you.
@Spyros.Charalambous8 ай бұрын
It's the most simplified video ever! thank you so much for your time!!!
@cameronmcnz8 ай бұрын
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. 👍
@matk228322 күн бұрын
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
@cameronmcnz22 күн бұрын
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!
@readmyheart4 ай бұрын
that intro... this guy's about to save my life. thanks in advance!
@cameronmcnz4 ай бұрын
Nobody gets out alive, I'm afraid. Thanks for watching and commenting!
@pravinprince32219 ай бұрын
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
@cameronmcnz9 ай бұрын
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.
@jeetendranavgikar63847 ай бұрын
After watching so many videos for the solution. this video got it right. thank you
@cameronmcnz7 ай бұрын
Why would you watch someone else's video? Happy to help!
@mytube25813 ай бұрын
Thanks
@cameronmcnz3 ай бұрын
Wow! I'm always here to help, and for you, twice as much!
@ChanceMinus17 күн бұрын
Invaluable info. Thank you.
@cameronmcnz17 күн бұрын
You gotta do this the right way or you're in trouble.
@Shahroze_Ай бұрын
Genuinely the best video I've watched for this scenario. Appreciate it!
@cameronmcnzАй бұрын
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!
@shawnbunch48727 ай бұрын
Clear, concise, and straight to the point. 🐐
@cameronmcnz7 ай бұрын
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.
@vodka79248 ай бұрын
You are a life saver sir, Thank you!!!
@cameronmcnz8 ай бұрын
Happy to help!
@ChiragYadav-w1d6 ай бұрын
Don't think there will be any other video which will explain it much better than you sir. Thank you
@cameronmcnz3 ай бұрын
Thanks so much for the kind words!
@samhkwest7 ай бұрын
Thanks for your demonstration. I've just used this tricks to fix a code merges issue for my work.
@cameronmcnz7 ай бұрын
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!
@kevindichter2 ай бұрын
You're a lifesaver! I thought I lost so much progress!
@mallenkbАй бұрын
You really saved me soo much time. Thank you
@cameronmcnzАй бұрын
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.
@mrjath46047 күн бұрын
Thank you so much, you explained everything in a simple way.
@ABDUL-REHMAN3457 ай бұрын
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♥♥
@cameronmcnz7 ай бұрын
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!
@joshlindsay873 ай бұрын
Thank you. Best video I found which helped be roll back some AI destruction.
@cameronmcnz3 ай бұрын
Rolling back AI destruction is basically half of my job these days. Glad I could help!
@tencebakpao48202 ай бұрын
You are a hero! It worked like a charm
@amalkrishnas16965 ай бұрын
thank you, great video
@TheIguana3d3 ай бұрын
You help me a lot, thank you so much!
@tamaritah24053 ай бұрын
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?
@cameronmcnz3 ай бұрын
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!
@tamaritah24053 ай бұрын
@@cameronmcnz thank you
@keifer78135 ай бұрын
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? 🤔
@justin94948 ай бұрын
thank you so much!
@cameronmcnz8 ай бұрын
Happy to help! Which approach did you take? Revert the pushed commit or reset it?
@justin94948 ай бұрын
@@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!
@cameronmcnz8 ай бұрын
@@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?
@utuberyder5 ай бұрын
Perfect one.
@cameronmcnz5 ай бұрын
Always happy the help. Thanks for watching!
@abujayed-dot-com7 ай бұрын
tnx, life saving.
@cameronmcnz7 ай бұрын
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.
@rosaal90305 ай бұрын
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
@gnmlna9 күн бұрын
Thank you!
@Snowdennnn018 ай бұрын
thanks. your video really helped me
@pclovers2198 ай бұрын
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.sreepuram19608 ай бұрын
How to undo commit if we committ before push and get an error
@cameronmcnz8 ай бұрын
You can run into so many different scenarios. What's the error? I've probably run into it.
@cesarmta877 ай бұрын
Thank you!!!
@thakurj64728 күн бұрын
Too good.
@spacetabs4 ай бұрын
Using git reset with push -f (force) without understanding what you are doing, extremely bad things will happen.