Git: change an older commit with rebase interactive

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 18

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars Год назад +1

    thanks a lot, this is what I wanted
    simple and to the point :)

  • @RichStoneIO
    @RichStoneIO 3 года назад +7

    This is so good, no more googling this stuff up anymore. Also learned "git log - -oneline" ❤️
    Maybe you could write down (or mention next time) the vim commands that you were using to copy paste things in interactive mode and exit vim after 🙏

    • @davem.6481
      @davem.6481  3 года назад

      Thanks Rich! Yeah I will do that in the next video - I used nano as editor. For nano the command to cut is Ctrl + k, to paste Ctrl + u.

  • @greatrespect1549
    @greatrespect1549 Год назад +1

    Great video. Thanks for sharing.

  • @stalan7404
    @stalan7404 2 года назад +1

    thank you.
    7:10 how can we safe our operations in interactive mod? just pressing ENTER is not working for me.

    • @davem.6481
      @davem.6481  2 года назад +2

      You are absolutely right, didn't explain that clearly. Thanks for asking. With the editor I'm using in the video (nano) for saving our made changes, we need to:
      1. press ctrl + x-key (for exit)
      2. press y-key (for yes)
      3. press enter-key.
      Does this work for you? Or do you use a different editor?

    • @stalan7404
      @stalan7404 2 года назад +2

      @@davem.6481 i am using xubuntu terminal.
      ctrl + x is worked for exit.
      but ctrl+y or just y seems ineffective.
      when i pressed ctrl + x terminal said "save modifed buffers. yes or no". so in this way i was able to save.

    • @UTube4075
      @UTube4075 2 года назад

      @@davem.6481 how to save the changes plz explain for Ubuntu OS.

    • @davem.6481
      @davem.6481  2 года назад +1

      @@UTube4075 Hey did you try the explanation from above? They are meant for Ubuntu. Does ctrl + x-key work, or how far do you come? As @Stalan wrote, for him it worked with "yes" instead of just "y" for the second step.

    • @UTube4075
      @UTube4075 2 года назад +1

      @@davem.6481 ctrl+x worked for me.
      This is for exit the editor, when do so it ask for to save or not. By pressing Y it save the changes we made and finally hit the enter button.
      Thank you mate for the video.

  • @peterge98
    @peterge98 Год назад

    Thx! This answers the question I had regarding reordering

  • @sai_charan
    @sai_charan Год назад

    Thank you, Dave 🙏

  • @havefun5519
    @havefun5519 2 года назад

    After rebase and move my commit position line with fixup and save, I have another branch tree point for mater branch and another for HEAD.

    • @davem.6481
      @davem.6481  2 года назад

      Hey do you have a question, why it happens like this? If yes could you give more detailed steps what you did?

  • @testermobile834
    @testermobile834 2 года назад

    can we sign the older commit ??

    • @davem.6481
      @davem.6481  2 года назад

      Hey =), I don‘t understand what you mean. Could you provide more details?

    • @testermobile834
      @testermobile834 Год назад

      @@davem.6481
      1. I need to get all unsigned commits
      2. GPG Sign them

    • @davem.6481
      @davem.6481  Год назад

      @@testermobile834 I am sorry I have no clue how to do that. Hopefully somebody else can help you with that. Good success!