Thanks for leaving a comment - it's really motivating to hear from my viewers when something I make helps them. I feel like I make the best Git tutorials on UA-cam, but they take a long time to produce & UA-cam doesn't always promote them so it can feel demoralizing. Thanks again for taking the time to leave a comment - it means a lot
@@themoderncoder I never leave comments on YT, I left it because your videos are quite good. I'm a sw dev so I watched a lot of git tutorials, and yours it's probably the better explained. I know that the success of a channel it's sudden, there is a plateau before a spike in views where YT starts to recommend your content. You are still in the plateau, but if you keep explaining this well it's probably a matter of time. If I may suggest, you could focus on new tools which don't have many tutorials out there yet. e.g. I would watch a good Gradle or Kotlin for Spring video as part of my job knowledge improvement. Best of luck mate.
Everyone needs to understand that all those 'deleted' commits still exist in the git index. If you accidentally committed a secret and pushed it, then you've got a bigger problem. There's really no use case I've ever found for a revert commit, as opposed to a rebase to simply take the commit out of history. The commit still lives in the index so it's not lost.
You can’t have uncommitted changes in the working directory when you rebase. Run “git add .” Followed by “git stash” then you can run the rebase. After you’re done, pop those uncommitted changes from the stash using “git stash pop”. I have a whole video on stash if you want to take a deeper look
Guuuuh NONE OF THIS ACTUALLY DELETES COMMITS! You can still check them out by hash, they persist in the history even if no branches or tags point to it.
That’s true, and a good thing to keep in mind for edge cases that involve accidentally committed secret information. To help future readers: Git is not designed to hold secrets like passwords or access keys, so if any of those things make it into a commit they should be treated as compromised and updated immediately. You can go through the process of deleting the cached (or history) version of the commit, but at best we’re talking about a second line of defense that can’t be relied upon in regards to sensitive information in particular.
As a beginner I didn't realize how important/awesome git rebase was and tried my best to avoid it. Now I can't imagine life without it.
thank you! i was googling for hours till i reach your video!
Thankyou so much.. I was trying from 2 days today i'm able to delete the commits and my code was finally pushed. 😍
Really very helpful tutorial, crisp and clear. Thank you so much!
thank you man your save my project!
Thank you very nice explanation with graph util!
Excellent explanation, thanks! Please keep doing this
Thanks for leaving a comment - it's really motivating to hear from my viewers when something I make helps them. I feel like I make the best Git tutorials on UA-cam, but they take a long time to produce & UA-cam doesn't always promote them so it can feel demoralizing. Thanks again for taking the time to leave a comment - it means a lot
@@themoderncoder I never leave comments on YT, I left it because your videos are quite good. I'm a sw dev so I watched a lot of git tutorials, and yours it's probably the better explained.
I know that the success of a channel it's sudden, there is a plateau before a spike in views where YT starts to recommend your content. You are still in the plateau, but if you keep explaining this well it's probably a matter of time.
If I may suggest, you could focus on new tools which don't have many tutorials out there yet. e.g. I would watch a good Gradle or Kotlin for Spring video as part of my job knowledge improvement.
Best of luck mate.
keep it up.ideal way to teach
easy to understand!! thank you so much!
I wonder if you could share your terminal and vim settings? They're cool, especially the coloring.
Of course - I actually made a video on it here:
ua-cam.com/video/DetYI7bjNrw/v-deo.html
Everyone needs to understand that all those 'deleted' commits still exist in the git index. If you accidentally committed a secret and pushed it, then you've got a bigger problem.
There's really no use case I've ever found for a revert commit, as opposed to a rebase to simply take the commit out of history. The commit still lives in the index so it's not lost.
After git rebase -i HEAD~n I got an error :
cannot rebase : you have unstaged changes .
Please commit or stash them.
What to do ?
You can’t have uncommitted changes in the working directory when you rebase. Run “git add .” Followed by “git stash” then you can run the rebase. After you’re done, pop those uncommitted changes from the stash using “git stash pop”. I have a whole video on stash if you want to take a deeper look
my save and exit are not working
What’s the error? If you give me some more information about what’s happening, I can try and point you in the right direction
a few time ctrl+c click .You will see there
Guuuuh NONE OF THIS ACTUALLY DELETES COMMITS! You can still check them out by hash, they persist in the history even if no branches or tags point to it.
That’s true, and a good thing to keep in mind for edge cases that involve accidentally committed secret information. To help future readers: Git is not designed to hold secrets like passwords or access keys, so if any of those things make it into a commit they should be treated as compromised and updated immediately. You can go through the process of deleting the cached (or history) version of the commit, but at best we’re talking about a second line of defense that can’t be relied upon in regards to sensitive information in particular.
Its my 10th video where author does not show where those commands should be written
In the terminal program. On macOS it’s called “Terminal” on Windows it’s “Command Prompt”
@@themoderncoder i found out that i need to install something called GIT. And then run GIT Bash or GIT GUI. Then those commands will work
Excellent !!
No popup for revert. Dislike.
Lol you caught me. I haven’t made it yet. Next vid is going to be merge conflicts then after that, revert
@@themoderncoder oh, boy, you are sick