Delete Git Commits Tutorial

Поділитися
Вставка
  • Опубліковано 4 січ 2025

КОМЕНТАРІ • 29

  • @GravitySmashify
    @GravitySmashify Рік тому +1

    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.

  • @sharkavli
    @sharkavli Рік тому

    thank you! i was googling for hours till i reach your video!

  • @Tejaswini-mm1yc
    @Tejaswini-mm1yc Рік тому

    Thankyou so much.. I was trying from 2 days today i'm able to delete the commits and my code was finally pushed. 😍

  • @35-ekta94
    @35-ekta94 Рік тому +1

    Really very helpful tutorial, crisp and clear. Thank you so much!

  • @eminem992i
    @eminem992i 9 місяців тому

    thank you man your save my project!

  • @internetuser9309
    @internetuser9309 10 місяців тому

    Thank you very nice explanation with graph util!

  • @quantumbitstudio
    @quantumbitstudio Рік тому +1

    Excellent explanation, thanks! Please keep doing this

    • @themoderncoder
      @themoderncoder  Рік тому

      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

    • @quantumbitstudio
      @quantumbitstudio Рік тому

      @@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.

  • @SajjadAhmed-lc2dr
    @SajjadAhmed-lc2dr Рік тому +1

    keep it up.ideal way to teach

  • @yufangchiu3813
    @yufangchiu3813 Рік тому

    easy to understand!! thank you so much!

  • @vatssv3006
    @vatssv3006 Рік тому

    I wonder if you could share your terminal and vim settings? They're cool, especially the coloring.

    • @themoderncoder
      @themoderncoder  Рік тому

      Of course - I actually made a video on it here:
      ua-cam.com/video/DetYI7bjNrw/v-deo.html

  • @siliconrockstar187
    @siliconrockstar187 4 місяці тому

    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.

  • @dorzhavian8853
    @dorzhavian8853 6 місяців тому

    After git rebase -i HEAD~n I got an error :
    cannot rebase : you have unstaged changes .
    Please commit or stash them.
    What to do ?

    • @themoderncoder
      @themoderncoder  6 місяців тому

      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

  • @abinbinu1272
    @abinbinu1272 Рік тому

    my save and exit are not working

    • @themoderncoder
      @themoderncoder  Рік тому

      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

    • @OnurGirginn
      @OnurGirginn 10 місяців тому

      a few time ctrl+c click .You will see there

  • @FilthyGoose
    @FilthyGoose Рік тому +1

    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.

    • @themoderncoder
      @themoderncoder  Рік тому +2

      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.

  • @bartoszcempura3342
    @bartoszcempura3342 2 місяці тому

    Its my 10th video where author does not show where those commands should be written

    • @themoderncoder
      @themoderncoder  2 місяці тому

      In the terminal program. On macOS it’s called “Terminal” on Windows it’s “Command Prompt”

    • @bartoszcempura3342
      @bartoszcempura3342 2 місяці тому

      @@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

  • @matk2283
    @matk2283 9 місяців тому

    Excellent !!

  • @aammssaamm
    @aammssaamm Рік тому

    No popup for revert. Dislike.

    • @themoderncoder
      @themoderncoder  Рік тому

      Lol you caught me. I haven’t made it yet. Next vid is going to be merge conflicts then after that, revert

    • @aammssaamm
      @aammssaamm Рік тому

      @@themoderncoder oh, boy, you are sick