forked from jesseduffield/lazygit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for working with stacked branches
- Loading branch information
1 parent
4eb7339
commit 94daf7b
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Working with stacked branches | ||
|
||
When working on a large branch it can often be useful to break it down into | ||
smaller pieces, and it can help to create separate branches for each independent | ||
chunk of changes. For example, you could have one branch for preparatory | ||
refactorings, one for backend changes, and one for frontend changes. Those | ||
branches would then all be stacked onto each other. | ||
|
||
Git has support for rebasing such a stack as a whole; you can enable it by | ||
setting the git config `rebase.updateRfs` to true. If you then rebase the | ||
topmost branch of the stack, the other ones in the stack will follow. This | ||
includes interactive rebases, so for example amending a commit in the first | ||
branch of the stack will "just work" in the sense that it keeps the other | ||
branches properly stacked onto it. | ||
|
||
Lazygit visualizes the invidual branch heads in the stack by marking them with a | ||
cyan asterisk (or a cyan branch symbol if you are using [nerd | ||
fonts](Config.md#display-nerd-fonts-icons)). |