Skip to content

Instantly share code, notes, and snippets.

@AFutureD
Created January 30, 2024 04:07
Show Gist options
  • Save AFutureD/b34cdd058f023baea3e6b19917522942 to your computer and use it in GitHub Desktop.
Save AFutureD/b34cdd058f023baea3e6b19917522942 to your computer and use it in GitHub Desktop.
LazyGit Config
gui:
sidePanelWidth: 0.25
git:
paging:
colorArg: always
externalDiffCommand: 'difft --color=always --display="$([ $(tput cols) -lt 180 ] && echo inline || echo side-by-side-show-both)" --context=4' # side-by-side-show-both
# externalDiffCommand: tput cols
keybinding:
universal:
filteringMenu: 'F'
customCommands:
- key: 'R'
context: 'subCommits'
command: 'git reset --mixed "{{.SelectedSubCommit.Sha}}"'
description: 'Reset Branch To Commit'
prompts:
- type: 'confirm'
title: 'Reset Branch To Commit'
body: 'Are you sure you want to reset Branch({{.SelectedLocalBranch.Name}}) to Commit({{.SelectedSubCommit.Sha}})?'
- key: 'D'
context: 'files'
command: 'git checkout -- "{{.SelectedPath}}"'
description: 'Discard Selected File'
prompts:
- type: 'confirm'
title: 'Discard Selected File'
body: 'Are you sure you want to discard "{{.SelectedPath}}"?'
- key: b
command: git blame -- {{.SelectedFile.Name}}
context: files
description: blame file at tree
subprocess: yes
- key: b
command: git blame {{.SelectedSubCommit.Sha}} -- {{.SelectedCommitFile.Name}}
context: commitFiles
description: blame file at revision
subprocess: yes
- key: B
command: git blame -- {{.SelectedCommitFile.Name}}
context: commitFiles
description: blame file at tree
subprocess: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment