Skip to content

Commit bb0e0f0

Browse files
committed
Add git branch prefix option
1 parent 06f3bf1 commit bb0e0f0

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

home/.chezmoi.toml.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{{ $email := promptStringOnce . "email" "Email Address (Git, GPG, etc.)" -}}
22
{{ $gitName := promptStringOnce . "gitName" "Name to use for git actions" -}}
3+
{{ $gitBranchPrefix := promptStringOnce . "gitBranchPrefix" "Prefix to apply to new git branches by default" -}}
34
{{ $gitHooksPath := promptStringOnce . "gitHooksPath" "Custom core Git hooks path" -}}
45
{{ $gui := promptBoolOnce . "gui" "Enable GUI options" -}}
56
{{ $defaultPkgType := "brew" -}}
@@ -31,3 +32,4 @@
3132
useLinuxBrew = {{ $useLinuxBrew | toToml }}
3233
tags = {{ get $ "tags" | default list | toToml }}
3334
brewPrefix = {{ $brewPrefix | toToml }}
35+
gitBranchPrefix = {{ $gitBranchPrefix | toToml }}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ alias ll="ls -l"
44
alias la="ls -la"
55
alias gcloud-reauth="gcloud auth login && gcloud auth application-default login"
66
alias git-prune-all="git fetch --all && git remote prune origin && git branch -v | grep -v '^*' | grep '\\[gone\\]' | awk '{print \$1}' | xargs git branch -d"
7+
8+
new-branch() {
9+
git checkout -b "{{ .gitBranchPrefix }}$1"
10+
}

0 commit comments

Comments
 (0)