Commit 6ce926e93d74
Changed files (2)
dots
config
lazygit
dots/config/lazygit/config.yml
@@ -0,0 +1,156 @@
+disableStartupPopups: true
+notARepository: skip
+
+os:
+ edit: "lazyvim -- {{filename}}"
+ editAtLine: "lazyvim +{{line}} {{filename}}"
+ editAtLineAndWait: "lazyvim +{{line}} {{filename}}"
+ openDirInEditor: "lazyvim -- {{dir}}"
+ editInTerminal: true
+
+git:
+ overrideGpg: true
+ autoFetch: true
+ autoRefresh: true
+ fetchAll: true
+ autoForwardBranches: onlyMainBranches
+ autoStageResolvedConflicts: true
+ mainBranches:
+ - main
+ - master
+ pagers:
+ - colorArg: always
+ pager: delta --paging=never --dark --line-numbers --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"
+ commit:
+ signOff: true
+ parseEmoji: true
+ skipHookPrefix: WIP
+ branchLogCmd: "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium --oneline {{branchName}} --"
+
+gui:
+ showRootItemInFileTree: false
+ showRandomTip: false
+ showDivergenceFromBaseBranch: onlyArrow
+ nerdFontsVersion: "3"
+ filterMode: fuzzy
+
+keybinding:
+ universal:
+ select: "s"
+
+customCommands:
+ # Sync: fetch + rebase + push current branch
+ - key: ";"
+ description: "Sync Pull/Push"
+ context: "global"
+ command: "git fetch {{.CheckedOutBranch.UpstreamRemote}} && git rebase {{.CheckedOutBranch.UpstreamRemote}}/{{.CheckedOutBranch.Name}} && git push {{.CheckedOutBranch.UpstreamRemote}} {{.CheckedOutBranch.Name}}"
+ loadingText: "Syncing...."
+ output: popup
+
+ # AI-generated commit message
+ - key: "\\"
+ description: "AI Commit current changes"
+ context: "global"
+ command: "git diff --cached >/dev/null && aicommit -sn -mgemini:gemini-2.0-flash-lite-preview || echo 'Fail'"
+ loadingText: "generating commit message...."
+ output: popup
+
+ # Prune local branches whose upstream is gone
+ - key: "G"
+ context: "localBranches"
+ description: "Prune local branches no longer on remote (Gone)"
+ loadingText: "Pruning gone branches..."
+ command: |
+ git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done
+
+ # Fetch upstream and rebase current branch (for forks)
+ - key: "U"
+ context: "localBranches"
+ description: "Fetch upstream & rebase on branch"
+ loadingText: "Fetching upstream & rebasing..."
+ prompts:
+ - type: "input"
+ title: "Upstream branch to rebase on"
+ key: "UpstreamBranch"
+ initialValue: "main"
+ command: "git fetch upstream && git rebase upstream/{{.Form.UpstreamBranch}}"
+
+ # Push to a specific remote with explicit refspec
+ - key: "<c-o>"
+ context: "localBranches"
+ description: "Push to a specific remote"
+ loadingText: "Pushing..."
+ prompts:
+ - type: "input"
+ title: "Remote to push to"
+ key: "Remote"
+ initialValue: "origin"
+ command: "git push {{.Form.Remote}} {{.CheckedOutBranch.Name}}:{{.CheckedOutBranch.Name}}"
+
+ # Prune stale remote tracking references
+ - key: "<c-p>"
+ context: "remotes"
+ description: "Prune stale remote tracking refs"
+ loadingText: "Pruning..."
+ command: "git remote prune {{.SelectedRemote.Name}}"
+
+ # Conventional commit with type/scope/message prompts
+ - key: "<c-c>"
+ context: "files"
+ description: "Conventional commit"
+ prompts:
+ - type: "menu"
+ key: "Type"
+ title: "Type of change"
+ options:
+ - name: "feat"
+ description: "A new feature"
+ value: "feat"
+ - name: "fix"
+ description: "A bug fix"
+ value: "fix"
+ - name: "chore"
+ description: "Other changes that don't modify src or test files"
+ value: "chore"
+ - name: "ci"
+ description: "CI related changes"
+ value: "ci"
+ - name: "docs"
+ description: "Documentation only changes"
+ value: "docs"
+ - name: "refactor"
+ description: "A code change that neither fixes a bug nor adds a feature"
+ value: "refactor"
+ - name: "test"
+ description: "Adding or correcting tests"
+ value: "test"
+ - name: "build"
+ description: "Changes that affect the build system or deps"
+ value: "build"
+ - type: "input"
+ title: "Scope (optional)"
+ key: "Scope"
+ - type: "input"
+ title: "Message"
+ key: "Message"
+ command: "git commit -s -m '{{.Form.Type}}{{if .Form.Scope}}({{.Form.Scope}}){{end}}: {{.Form.Message}}'"
+
+ # Open or create PR in browser
+ - key: "O"
+ context: "global"
+ description: "Open/Create PR in browser"
+ command: "gh pr view --web 2>/dev/null || gh pr create --web"
+ output: terminal
+
+ # Open repo on GitHub
+ - key: "H"
+ context: "status"
+ description: "Open repo on GitHub"
+ command: "gh repo view --web"
+ output: terminal
+
+ # Copy commit hash to clipboard
+ - key: "Y"
+ context: "commits"
+ description: "Copy commit hash to clipboard"
+ command: "printf '%s' '{{.SelectedLocalCommit.Hash}}' | wl-copy"
dots/Makefile
@@ -88,10 +88,11 @@ agent-skill-manager-bin : ~/bin/agent-skill-manager
##@ Dev Tools
-all += git-template copilot-hooks opencode-plugin lazyworktree lazypr
+all += git-template copilot-hooks opencode-plugin lazygit lazyworktree lazypr
git-template : ~/.config/git/template
copilot-hooks : ~/.config/copilot-hooks
opencode-plugin : ~/.config/opencode/plugin
+lazygit : ~/.config/lazygit/config.yml
lazyworktree : ~/.config/lazyworktree/config.yaml
lazypr : ~/.config/lazypr/config.toml