Git rest & revert deep dive | Git revert vs reset Demo | Git tutorial | Java Home Cloud

Sdílet
Vložit
  • čas přidán 15. 06. 2024
  • Register for Online Training 👉 bit.ly/3vuBQqb
    Git revert and git reset are two Git commands used to undo changes in a Git repository, but they work differently.
    Git revert is a command that creates a new commit that undoes the changes made by a previous commit. It is a safe way to undo changes in Git, as it does not modify the commit history. Instead, it adds a new commit that contains the opposite changes to the ones in the commit you want to undo. This means that the commit history is preserved and that you can revert the revert later if you need to.
    Git reset, on the other hand, is a command that modifies the commit history by moving the branch pointer to a previous commit. It allows you to discard changes made after a specific commit and to reset the repository to that commit's state. This means any commits made after the reset commit will be removed from the repository's commit history.
    📞 WhatsApp Us: wa.me/+919886611117
    Instagram / javahomecloud
    LinkedIn / javahomecloud
    Website 👉 javahome.in/
    ✨ Popular Playlist ✨
    AWS Lambda, Python & Boto3 👉 shorturl.at/brx69
    Terraform FAQs 👉 shorturl.at/fuILT
    Jenkins Tutorial 👉 shorturl.at/CKR37
    🏛️ Courses Offer By Java Home Cloud 🏛️
    Courses offered 👉 bit.ly/457HlHc
    📹 Udemy Courses 📹
    Terraform 👉 t.ly/eEv1x
    Boto3 👉 t.ly/IOZIm
    AWS CloudFormation 👉 t.ly/fenbh
    Jenkins 👉 bit.ly/48lDI34
    Subscribe to my Channel / @javahomecloud

Komentáře • 14

  • @mrasoft7184
    @mrasoft7184 Před 11 měsíci +5

    Hello Sir, the best explanation I have seen so far about git revert and git reset. Thanks and keep up the good work 👍

  • @JavaHomeCloud
    @JavaHomeCloud  Před 2 měsíci

    🌟 Welcome to Java Home Cloud 🌟
    Register for Online Training 👉 bit.ly/3vuBQqb
    🌐Website 👉javahome.in

  • @manjunadh1
    @manjunadh1 Před 28 dny +1

    You can use git reset and do a force push.

  • @rituparnachakraborty721
    @rituparnachakraborty721 Před 5 měsíci

    brilliant. thank you

  • @jishnupdileep3143
    @jishnupdileep3143 Před 9 měsíci +1

    Nice tutorial

  • @LostInTheMysteriousWorld
    @LostInTheMysteriousWorld Před 10 měsíci

    Thats on op video

  • @anandhakumarg6032
    @anandhakumarg6032 Před 7 měsíci

    SIr, can we able to revert it to a specific commit we want using revert command?
    In our case, we are just reverting the most recent commit that we made.

    • @JavaHomeCloud
      @JavaHomeCloud  Před 7 měsíci

      try git revert command to revert any arbitrary commit
      git revert

  • @dariorodriguez8450
    @dariorodriguez8450 Před rokem

    Man, you can push the removal of a commit using -force. That local vs remote idea is just wrong. You want git revert because you want to keep track of the reverted changes. Not pushing resets is just a best practice, it’s not impossible.

  • @dhirajprasad4141
    @dhirajprasad4141 Před rokem

    There is no git rest command, plz correct it

    • @JavaHomeCloud
      @JavaHomeCloud  Před rokem

      Its there Dhiraj,
      git-scm.com/docs/git-reset

    • @sumanta8504
      @sumanta8504 Před rokem

      Yes @Dhiraj you are correct there is no 'rest' command, 'reset' command is there