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!
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.
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 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
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
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
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.
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.
@@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.
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: ""
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?
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)
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 😉
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?
Lazygit and lazydocker are 2 great tools I don’t leave /home without. Those inspired me to start using gocui. Great work m8!
thanks for lazygit ❤
you're amazing!
Please ignore the fact that I look like a character from A Scanner Darkly with this very low-powered background cropping effect enabled
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!
You are a hero. My workflow got so much nicer since picking up lazy gig, and it just keeps improving
I recently discovered lazygit. All I can say is that its super awesome
Thank you for your job!
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.
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)
Seems like this isn't yet in a tagged release, I had to use master
@@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
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
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
TIL! Thank you ❤
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.
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.
@@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.
Thank you :D
Quick question, how did you do the empty commits in lazygit?
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: ""
Awesome!
Thank you
Cool stuff! I also like worktrees to work on each branch independently, but it doesn't automatically update refs :)
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?
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)
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 😉
Yo how do you even make that??????
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?