Stacked Branches With Lazygit

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 29

  • @panproteus
    @panproteus หลายเดือนก่อน +4

    Lazygit and lazydocker are 2 great tools I don’t leave /home without. Those inspired me to start using gocui. Great work m8!

  • @farhanyahya5466
    @farhanyahya5466 หลายเดือนก่อน +12

    thanks for lazygit ❤
    you're amazing!

  • @jesseduffield9516
    @jesseduffield9516  หลายเดือนก่อน +19

    Please ignore the fact that I look like a character from A Scanner Darkly with this very low-powered background cropping effect enabled

    • @JoseBrowne
      @JoseBrowne 21 วันที่ผ่านมา

      Ignore it? Please - you're out here living in 2025 while everyone else is stuck in boring, fully-rendered reality. This is what the future looks like and I'm here for it!

  • @shadowviper95
    @shadowviper95 หลายเดือนก่อน

    You are a hero. My workflow got so much nicer since picking up lazy gig, and it just keeps improving

  • @davidmuriithi1809
    @davidmuriithi1809 หลายเดือนก่อน +2

    I recently discovered lazygit. All I can say is that its super awesome

  • @cristhiamtovar9003
    @cristhiamtovar9003 หลายเดือนก่อน +1

    Thank you for your job!

  • @eliberkowitz7454
    @eliberkowitz7454 หลายเดือนก่อน +1

    This is cool. I like using ghstack, which has a one-commit-per-pr approach. Since I don't do tons of intermediate commits and do somewhat small prs, it works for me, but it has its limitations.

  • @andreasg.dpetersen4252
    @andreasg.dpetersen4252 24 วันที่ผ่านมา

    Trying to follow here, but after enabling updateRefs when pressing "e" on grape (tip of the fruits) I don't see the update-refs. Only if I go one below the tip of fruits to "apple" do I see it, but then adding the commit becomes the second last in the fruits branch and I will have to move swap those after. Is there some config I'm missing? (Running lazygit v44.1 and git v2.47.1)

    • @AlexOzer
      @AlexOzer 21 วันที่ผ่านมา +2

      Seems like this isn't yet in a tagged release, I had to use master

    • @jesseduffield9516
      @jesseduffield9516  19 วันที่ผ่านมา +2

      @@AlexOzer Indeed: my bad! There's a new release out now which has all the functionality from this video github.com/jesseduffield/lazygit/releases/tag/v0.45.0

  • @ocokanet
    @ocokanet หลายเดือนก่อน

    How do you make an empty commit in lazygit ? I know it is possible with "allow-empty" arg in command line, but can't find what combination it makes in lazygit

    • @jesseduffield9516
      @jesseduffield9516  19 วันที่ผ่านมา +1

      I've got a custom command for that in my config.yml file:
      customCommands:
      - description: 'Add empty commit'
      key: 'E'
      context: 'commits'
      loadingText: 'Committing empty commit...'
      prompts:
      - type: 'input'
      key: 'Message'
      title: 'Empty commit message'
      See github.com/jesseduffield/lazygit/blob/master/docs/Custom_Command_Keybindings.md for more info

  • @CocXx
    @CocXx หลายเดือนก่อน

    TIL! Thank you ❤

  • @AlexOzer
    @AlexOzer 14 วันที่ผ่านมา

    Is there a way to create a new commit with staged changes at the rebase start point? I see you demonstrate creating an empty commit, fixup commit, and amended commit, but I'm not sure how to simply create a commit from the outstanding staged changes as a new commit on the tip of some stacked branch.

    • @jesseduffield9516
      @jesseduffield9516  14 วันที่ผ่านมา

      Good question: I think that's a current limitation. What would be cool is if I could press 'c' on a commit and then create a commit on top of it, such that if that commit was the head of a branch in the stack, it would update that branch to point to the new commit.

    • @AlexOzer
      @AlexOzer 13 วันที่ผ่านมา

      @@jesseduffield9516 That sounds pretty good to me!
      I'd also look forward to being able to push up all stacked branches at once like you mentioned. One caveat is that, apparently on my work's GitHub instance, pushing the branches of stacked PRs in the wrong order apparently may cause a big diff to be generated, pulling in half the programmers at the company as reviewers (yes I have done it, multiple times...). Supposedly pushing the lower branches in the chain first avoids the issue, so it might need to be careful to push them in order?
      Sorry for rambling in TH-cam comments, happy to transition to a GitHub issue/discussion if needed.

  • @llCrowkll
    @llCrowkll หลายเดือนก่อน +1

    Thank you :D
    Quick question, how did you do the empty commits in lazygit?

    • @SalvaToroTorus
      @SalvaToroTorus หลายเดือนก่อน +1

      Add this to your config.yml file
      customCommands:
      - context: "global" # Specifies the context where the shortcut is active
      key: "E"
      description: "Empty Commit with Message"
      command: 'git commit --allow-empty -m "{{index .PromptResponses 0}}"'
      prompts:
      - type: input
      title: "Enter empty commit message"
      initialValue: ""

    • @llCrowkll
      @llCrowkll หลายเดือนก่อน

      Awesome!
      Thank you

  • @wojciech-kulik
    @wojciech-kulik หลายเดือนก่อน

    Cool stuff! I also like worktrees to work on each branch independently, but it doesn't automatically update refs :)

  • @wojciech-kulik
    @wojciech-kulik หลายเดือนก่อน

    I see one possible problem here. Sometimes we've got a branch which is a base for 2 devs working simultaneously. In that case if I add a new commit to the base branch it will also rebase the other developer's branch. On top of that, I assume that if there are any conflicts, I will have to resolve conflicts for each branch, even if it's not mine. Am I correct?

    • @jesseduffield9516
      @jesseduffield9516  หลายเดือนก่อน

      I haven't tested it myself but that sounds right to me. I'm not sure of an easy way to get around that situation, though it does seem rare (I've never encountered it myself)

  • @linkarzu
    @linkarzu หลายเดือนก่อน +1

    I'm vegetarian and I feel attacked 😂😂😂
    Really appreciate all your work, I use lazygit every single day most of the day, of course from within neovim, by the way 😉

  • @larrylarry5393
    @larrylarry5393 26 วันที่ผ่านมา

    Yo how do you even make that??????

  • @CS-sv6eg
    @CS-sv6eg หลายเดือนก่อน

    Hi Jesse, thanks for lazygit, I discovered it just a few weeks ago, and for this video. For me (I am older guy, 55 😊 ) it's a bit hard to follow all the keystrokes but I think, after retrying it by myself a few times I understand it.
    One Question: what would happen, if the Pull Requests would be approved and merged out of order? In you example the meat before the fruits?