Allow setting a default name when creating new branches

This commit is contained in:
Elliot Cubit 2024-04-09 15:41:26 -04:00 committed by Jesse Duffield
parent 436240bbeb
commit 5959f7bc8e
6 changed files with 63 additions and 0 deletions

View file

@ -323,6 +323,9 @@ git:
# Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
replace: ""
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix
branchPrefix: ""
# If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀
# (This should really be under 'gui', not 'git')
parseEmoji: false
@ -885,6 +888,21 @@ git:
replace: '[$1] '
```
## Predefined branch name prefix
In situations where certain naming pattern is used for branches, this can be used to populate new branch creation with a static prefix.
Example:
Some branches:
- jsmith/AB-123
- cwilson/AB-125
```yaml
git:
branchPrefix: "firstlast/"
```
## Custom git log command
You can override the `git log` command that's used to render the log of the selected branch like so: