diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 03c43d411..6e7b5fd58 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -5,8 +5,6 @@ ARG VARIANT=1-bullseye
FROM golang:${VARIANT}
RUN go install mvdan.cc/gofumpt@latest
-RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.0
-RUN golangci-lint --version
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index a7b624a29..caeb15ba2 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -6,10 +6,10 @@ labels: bug
assignees: ''
---
-**Describe the bug**
+### Describe the bug
A clear and concise description of what the bug is.
-**To Reproduce**
+### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
@@ -17,20 +17,22 @@ Steps to reproduce the behavior:
3. Scroll down to '....'
4. See error
-**Expected behavior**
+### Expected behavior
A clear and concise description of what you expected to happen.
-**Screenshots**
+### Screenshots
If applicable, add screenshots to help explain your problem.
-**Version info:**
-_Run `lazygit --version` and paste the result here_
-_Run `git --version` and paste the result here_
+### Version info:
-**Additional context**
+* _Run `lazygit --version` and paste the result here_
+* _Run `git --version` and paste the result here_
+
+### Additional context
Add any other context about the problem here.
-**Note:** please try updating to the latest version or [manually building](https://github.com/jesseduffield/lazygit/#manual) the latest `master` to see if the issue still occurs.
+> [!NOTE]
+> Please try updating to the latest version or [manually building](https://github.com/jesseduffield/lazygit/#manual) the latest `master` to see if the issue still occurs.
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
deleted file mode 100644
index 0b5b7d980..000000000
--- a/.github/workflows/cd.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: Continuous Delivery
-
-on:
- push:
- tags:
- - "v*"
-
-jobs:
- goreleaser:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
- - name: Unshallow repo
- run: git fetch --prune --unshallow
- - name: Setup Go
- uses: actions/setup-go@v5
- with:
- go-version: 1.22.x
- - name: Run goreleaser
- uses: goreleaser/goreleaser-action@v4
- with:
- distribution: goreleaser
- version: v1.17.2
- args: release --clean
- env:
- GITHUB_TOKEN: ${{secrets.GITHUB_API_TOKEN}}
- homebrew:
- runs-on: ubuntu-latest
- steps:
- - name: Bump Homebrew formula
- uses: dawidd6/action-homebrew-bump-formula@v3
- with:
- token: ${{secrets.GITHUB_API_TOKEN}}
- formula: lazygit
diff --git a/.github/workflows/check-required-label.yml b/.github/workflows/check-required-label.yml
new file mode 100644
index 000000000..830060fd0
--- /dev/null
+++ b/.github/workflows/check-required-label.yml
@@ -0,0 +1,15 @@
+name: Check Required Labels
+
+on:
+ pull_request:
+ types: [opened, labeled, unlabeled]
+
+jobs:
+ check-required-label:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: mheap/github-action-required-labels@v5
+ with:
+ mode: exactly
+ count: 1
+ labels: "ignore-for-release, feature, enhancement, bug, maintenance, docs, i18n, performance"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 362bb9711..7f69523ba 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,7 +1,7 @@
name: Continuous Integration
env:
- GO_VERSION: 1.22
+ GO_VERSION: 1.24
on:
push:
@@ -32,14 +32,14 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
- go-version: 1.22.x
+ go-version: 1.24.x
- name: Test code
# we're passing -short so that we skip the integration tests, which will be run in parallel below
run: |
mkdir -p /tmp/code_coverage
go test ./... -short -cover -args "-test.gocoverdir=/tmp/code_coverage"
- name: Upload code coverage artifacts
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: coverage-unit-${{ matrix.os }}-${{ github.run_id }}
path: /tmp/code_coverage
@@ -49,11 +49,9 @@ jobs:
fail-fast: false
matrix:
git-version:
- - 2.20.0 # oldest supported version
- - 2.22.5
- - 2.23.0
- - 2.25.1
- - 2.30.8
+ - 2.32.0 # oldest supported version
+ - 2.38.2 # first version that supports the rebase.updateRefs config
+ - 2.44.0
- latest # We rely on github to have the latest version installed on their VMs
runs-on: ubuntu-latest
name: "Integration Tests - git ${{matrix.git-version}}"
@@ -89,7 +87,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
- go-version: 1.22.x
+ go-version: 1.24.x
- name: Print git version
run: git --version
- name: Test code
@@ -100,7 +98,7 @@ jobs:
mkdir -p /tmp/code_coverage
./scripts/run_integration_tests.sh
- name: Upload code coverage artifacts
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: coverage-integration-${{ matrix.git-version }}-${{ github.run_id }}
path: /tmp/code_coverage
@@ -115,7 +113,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
- go-version: 1.22.x
+ go-version: 1.24.x
- name: Build linux binary
run: |
GOOS=linux go build
@@ -142,7 +140,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
- go-version: 1.22.x
+ go-version: 1.24.x
- name: Check Vendor Directory
# ensure our vendor directory matches up with our go modules
run: |
@@ -168,23 +166,15 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
- go-version: 1.22.x
+ go-version: 1.24.x
- name: Lint
- uses: golangci/golangci-lint-action@v6.1.0
+ uses: golangci/golangci-lint-action@v8
with:
- version: v1.60
+ # If you change this, make sure to also update scripts/golangci-lint-shim.sh
+ version: v2.2.1
- name: errors
run: golangci-lint run
if: ${{ failure() }}
- check-required-label:
- runs-on: ubuntu-latest
- if: github.ref != 'refs/heads/master'
- steps:
- - uses: mheap/github-action-required-labels@v5
- with:
- mode: exactly
- count: 1
- labels: "ignore-for-release, feature, enhancement, bug, maintenance, docs, i18n, performance"
upload-coverage:
# List all jobs that produce coverage files
needs: [unit-tests, integration-tests]
@@ -197,10 +187,10 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
- go-version: 1.22.x
+ go-version: 1.24.x
- name: Download all coverage artifacts
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
path: /tmp/code_coverage
diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml
new file mode 100644
index 000000000..5a171348a
--- /dev/null
+++ b/.github/workflows/close-issues.yml
@@ -0,0 +1,39 @@
+name: Close Issues
+
+on:
+ issue_comment:
+ types: [created]
+
+permissions:
+ issues: write
+
+jobs:
+ close_issue:
+ runs-on: ubuntu-latest
+ if: ${{ github.event.issue.pull_request == null && startsWith(github.event.comment.body, '/close') }}
+ steps:
+ - uses: actions/github-script@v7
+ with:
+ script: |
+ const trustedUsers = ['ChrisMcD1', 'jesseduffield', 'stefanhaller']
+ const commenter = context.payload.comment.user.login
+
+ console.log(`Commenter: ${commenter}`)
+
+ if (!trustedUsers.includes(commenter)) {
+ console.log(`User ${commenter} is not trusted. Ignoring.`)
+ return
+ }
+
+ const issueNumber = context.payload.issue.number
+ const owner = context.repo.owner
+ const repo = context.repo.repo
+
+ await github.rest.issues.update({
+ owner,
+ repo,
+ issue_number: issueNumber,
+ state: 'closed'
+ })
+
+ console.log(`Closed issue #${issueNumber} by request from ${commenter}.`)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 000000000..abf81551f
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,151 @@
+name: Release
+
+on:
+ schedule:
+ # Runs at 8:00 AM UTC on every Saturday
+ # We'll check below if it's the first Saturday of the month, and fail if not
+ - cron: '0 8 * * 6'
+ # Allow manual triggering of the workflow
+ workflow_dispatch:
+ inputs:
+ version_bump:
+ description: 'Version bump type'
+ type: choice
+ required: true
+ default: 'patch'
+ options:
+ - minor
+ - patch
+ ignore_blocks:
+ description: 'Ignore blocking PRs/issues'
+ type: boolean
+ required: true
+ default: false
+
+defaults:
+ run:
+ shell: bash
+
+jobs:
+ check-and-release:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check for correct repository
+ if: ${{ github.event_name != 'workflow_dispatch' && github.repository != 'stefanhaller/lazygit' }}
+ run: |
+ echo "Should only run in the stefanhaller/lazygit repository"
+ exit 1
+
+ - name: Check for first Saturday of the month
+ if: ${{ github.event_name != 'workflow_dispatch' }}
+ run: |
+ if (( $(date +%e) > 7 )); then
+ echo "This is not the first Saturday of the month"
+ exit 1
+ fi
+
+ - name: Checkout Code
+ uses: actions/checkout@v4
+ with:
+ repository: jesseduffield/lazygit
+ token: ${{ secrets.LAZYGIT_RELEASE_PAT }}
+ fetch-depth: 0
+
+ - name: Get Latest Tag
+ run: |
+ latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1) || echo "v0.0.0")
+
+ if ! [[ $latest_tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ echo "Error: Tag format is invalid. Expected format: vX.X.X"
+ exit 1
+ fi
+
+ echo "Latest tag: $latest_tag"
+ echo "latest_tag=$latest_tag" >> $GITHUB_ENV
+
+ - name: Check for changes since last release
+ run: |
+ if [ -z "$(git diff --name-only ${{ env.latest_tag }})" ]; then
+ echo "No changes detected since last release"
+ exit 1
+ fi
+
+ - name: Check for Blocking Issues/PRs
+ if: ${{ !inputs.ignore_blocks }}
+ id: check_blocks
+ run: |
+ gh auth setup-git
+ gh auth status
+
+ echo "Checking for blocking issues and PRs..."
+
+ # Check for blocking issues
+ blocking_issues=$(gh issue list -l blocks-release --json number,title --jq '.[] | "- \(.title) (#\(.number))"')
+
+ # Check for blocking PRs
+ blocking_prs=$(gh pr list -l blocks-release --json number,title --jq '.[] | "- \(.title) (#\(.number)) (PR)"')
+
+ # Combine the results
+ blocking_items="$blocking_issues"$'\n'"$blocking_prs"
+
+ # Remove empty lines
+ blocking_items=$(echo "$blocking_items" | grep . || true)
+
+ if [ -n "$blocking_items" ]; then
+ echo "Blocking issues/PRs detected:"
+ echo "$blocking_items"
+ exit 1
+ fi
+ env:
+ GITHUB_TOKEN: ${{ secrets.LAZYGIT_RELEASE_PAT }}
+
+ - name: Calculate next version
+ run: |
+ echo "Latest tag: ${{ env.latest_tag }}"
+ IFS='.' read -r major minor patch <<< "${{ env.latest_tag }}"
+
+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
+ if [[ "${{ inputs.version_bump }}" == "patch" ]]; then
+ patch=$((patch + 1))
+ else
+ minor=$((minor + 1))
+ patch=0
+ fi
+ else
+ # Default behavior for scheduled runs
+ minor=$((minor + 1))
+ patch=0
+ fi
+
+ new_tag="$major.$minor.$patch"
+
+ if ! [[ $new_tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ echo "Error: New tag's format is invalid. Expected format: vX.X.X"
+ exit 1
+ fi
+
+ echo "New tag: $new_tag"
+ echo "new_tag=$new_tag" >> $GITHUB_ENV
+
+ - name: Create and Push Tag
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git tag ${{ env.new_tag }} -a -m "Release ${{ env.new_tag }}"
+ git push origin ${{ env.new_tag }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.LAZYGIT_RELEASE_PAT }}
+
+ - name: Setup Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: 1.24.x
+
+ - name: Run goreleaser
+ uses: goreleaser/goreleaser-action@v6
+ with:
+ distribution: goreleaser
+ version: v2
+ args: release --clean
+ env:
+ GITHUB_TOKEN: ${{secrets.LAZYGIT_RELEASE_PAT}}
diff --git a/.github/workflows/sponsors.yml b/.github/workflows/sponsors.yml
index 1737d6ce1..ce31c44e0 100644
--- a/.github/workflows/sponsors.yml
+++ b/.github/workflows/sponsors.yml
@@ -7,6 +7,7 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
+ if: ${{ github.repository == 'jesseduffield/lazygit' }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
@@ -16,13 +17,13 @@ jobs:
with:
token: ${{ secrets.SPONSORS_TOKEN }}
file: "README.md"
- if: ${{ github.repository == 'jesseduffield/lazygit' }}
- name: Create Pull Request 🚀
- uses: peter-evans/create-pull-request@v6
+ uses: peter-evans/create-pull-request@v7
with:
commit-message: "README.md: Update Sponsors"
title: "README.md: Update Sponsors"
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
labels: "ignore-for-release"
delete-branch: true
+ token: ${{ secrets.SPONSORS_PR_TOKEN }}
diff --git a/.gitignore b/.gitignore
index b45afa96f..9b0ebaef6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,10 +3,6 @@
# Logs
*.log
-# Hidden
-.*
-!.codespellrc
-
# Notes
*.notes
@@ -14,30 +10,19 @@
test/repos/repo
coverage.txt
+# JetBrains stuff
+.idea/
+
# Binaries
lazygit
lazygit.exe
-# Exceptions
-!.gitignore
-!.gitattributes
-!.goreleaser.yml
-!.golangci.yml
-!.circleci/
-!.github/
-!.vscode/
-!.devcontainer/
-
-# these are for our integration tests
-!.git_keep
-!.gitmodules_keep
-
test/git_server/data
test/_results/**
oryxBuildBinary
-__debug_bin
+__debug_bin*
.worktrees
demo/output/*
diff --git a/.golangci.yml b/.golangci.yml
index 9fbf5329e..b217d78a0 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,36 +1,110 @@
+version: "2"
+run:
+ go: "1.24"
linters:
enable:
- - gofumpt
- - thelper
- - goimports
- - tparallel
- - wastedassign
- - unparam
- - prealloc
- - unconvert
+ - copyloopvar
+ - errorlint
- exhaustive
+ - intrange
- makezero
- nakedret
- - copyloopvar
- fast: false
+ - nolintlint
+ - prealloc
+ - revive
+ - thelper
+ - tparallel
+ - unconvert
+ - unparam
+ - wastedassign
+ settings:
+ copyloopvar:
+ check-alias: true
+ exhaustive:
+ default-signifies-exhaustive: true
+ nakedret:
+ # the gods will judge me but I just don't like naked returns at all
+ max-func-lines: 0
+ staticcheck:
+ checks:
+ - all
-linters-settings:
- copyloopvar:
- # Check all assigning the loop variable to another variable.
- # Default: false
- # If true, an assignment like `a := x` will be detected as an error.
- check-alias: true
- exhaustive:
- default-signifies-exhaustive: true
- staticcheck:
- # SA1019 is for checking that we're not using fields marked as deprecated
- # in a comment. It decides this in a loose way so I'm silencing it. Also because
- # it's tripping on our own structs.
- checks: ["all", "-SA1019"]
- nakedret:
- # the gods will judge me but I just don't like naked returns at all
- max-func-lines: 0
+ # SA1019 is for checking that we're not using fields marked as
+ # deprecated in a comment. It decides this in a loose way so I'm
+ # silencing it. Also because it's tripping on our own structs.
+ - -SA1019
-run:
- go: '1.22'
- timeout: 10m
+ # ST1003 complains about names like remoteUrl or itemId (should be
+ # remoteURL and itemID). While I like these suggestions, it also
+ # complains about enum constants that are all caps, and we use these and
+ # I like them, and also about camelCase identifiers that contain an
+ # underscore, which we also use in a few places. Since it can't be
+ # configured to ignore specific cases, and I don't want to use nolint
+ # comments in the code, we have to disable it altogether.
+ - -ST1003 # Poorly chosen identifier
+
+ # Probably a good idea, but we first have to review our error reporting
+ # strategy to be able to use it everywhere.
+ - -ST1005 # Error strings should not be capitalized
+
+ # Many of our classes use self as a receiver name, and we think that's fine.
+ - -ST1006 # Use of self or this as receiver name
+
+ # De Morgan's law suggests to replace `!(a && b)` with `!a || !b`; but
+ # sometimes I find one more readable than the other, so I want to decide
+ # that myself.
+ - -QF1001 # De Morgan's law
+
+ # QF1003 is about using a tagged switch instead of an if-else chain. In
+ # many cases this is a useful suggestion; however, sometimes the change
+ # is only possible by adding a default case to the switch (when there
+ # was no `else` block in the original code), in which case I don't find
+ # it to be an improvement.
+ - -QF1003 # Could replace with tagged switch
+
+ # We need to review our use of embedded fields. I suspect that in some
+ # cases the fix is not to remove the selector for the embedded field,
+ # but to turn the embedded field into a named field.
+ - -QF1008 # Could remove embedded field from selector
+
+ # The following checks are all disabled by default in golangci-lint, but
+ # we disable them again explicitly here to make it easier to keep this
+ # list in sync with the gopls config in .vscode/settings.json.
+ - -ST1000, # At least one file in a package should have a package comment
+ - -ST1020, # The documentation of an exported function should start with the function's name
+ - -ST1021, # The documentation of an exported type should start with type's name
+ - -ST1022, # The documentation of an exported variable or constant should start with variable's name
+
+ dot-import-whitelist:
+ - github.com/jesseduffield/lazygit/pkg/integration/components
+ revive:
+ severity: warning
+ rules:
+ - name: atomic
+ - name: context-as-argument
+ - name: context-keys-type
+ - name: error-naming
+ - name: var-declaration
+ - name: package-comments
+ - name: range
+ - name: time-naming
+ - name: indent-error-flow
+ - name: errorf
+ - name: superfluous-else
+ exclusions:
+ generated: lax
+ presets:
+ - comments
+ - common-false-positives
+ - legacy
+ - std-error-handling
+ paths:
+ - vendor/
+formatters:
+ enable:
+ - gofumpt
+ - goimports
+ exclusions:
+ generated: lax
+ paths:
+ - vendor/
diff --git a/.goreleaser.yml b/.goreleaser.yml
index dcdaf117f..3b9997ecd 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -1,5 +1,5 @@
-# This is an example goreleaser.yaml file with some sane defaults.
-# Make sure to check the documentation at http://goreleaser.com
+version: 2
+
builds:
- env:
- CGO_ENABLED=0
@@ -18,42 +18,21 @@ builds:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.buildSource=binaryRelease
archives:
- - replacements:
- darwin: Darwin
- linux: Linux
- windows: Windows
- 386: 32-bit
- amd64: x86_64
+ - name_template: >-
+ {{- .ProjectName }}_
+ {{- .Version }}_
+ {{- .Os }}_
+ {{- if eq .Arch "amd64" }}x86_64
+ {{- else if eq .Arch "386" }}32-bit
+ {{- else if eq .Arch "arm" }}armv6
+ {{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
- format: zip
+ formats: [ zip ]
checksum:
name_template: 'checksums.txt'
snapshot:
- name_template: '{{ .Tag }}-next'
+ version_template: '{{ .Tag }}-next'
changelog:
use: github-native
sort: asc
-brews:
- -
- # Repository to push the tap to.
- tap:
- owner: jesseduffield
- name: homebrew-lazygit
-
- # Your app's homepage.
- # Default is empty.
- homepage: 'https://github.com/jesseduffield/lazygit/'
-
- # Your app's description.
- # Default is empty.
- description: 'A simple terminal UI for git commands, written in Go'
-
- # # Packages your package depends on.
- # dependencies:
- # - git
- # - zsh
- # # Packages that conflict with your package.
- # conflicts:
- # - svn
- # - bash
diff --git a/.vscode/launch.json b/.vscode/launch.json
index be436b55f..3bedda766 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -26,6 +26,15 @@
],
"console": "integratedTerminal",
},
+ {
+ "name": "JSON Schema generator",
+ "type": "go",
+ "request": "launch",
+ "mode": "auto",
+ "program": "${workspaceFolder}/pkg/jsonschema/generator.go",
+ "cwd": "${workspaceFolder}/pkg/jsonschema",
+ "console": "integratedTerminal",
+ },
{
"name": "Attach to a running Lazygit",
"type": "go",
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 219c87aea..dd4398af9 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,5 +1,29 @@
{
"gopls": {
"formatting.gofumpt": true,
+ "ui.diagnostic.staticcheck": true,
+ "ui.diagnostic.analyses": {
+ // This list must match the one in .golangci.yml
+ "SA1019": false,
+ "ST1003": false,
+ "ST1005": false,
+ "ST1006": false,
+ "QF1001": false,
+ "QF1003": false,
+ "QF1008": false,
+ "ST1000": false,
+ "ST1020": false,
+ "ST1021": false,
+ "ST1022": false,
+ // Dot imports; this warning is enabled in .golangci.yml, but with an
+ // extra dot-import-whitelist config. Because I couldn't figure out how to
+ // specify that extra config for gopls, I'm disabling the check altogether
+ // here.
+ "ST1001": false,
+ },
},
+ "go.alternateTools": {
+ "golangci-lint-v2": "${workspaceFolder}/scripts/golangci-lint-shim.sh",
+ },
+ "go.lintTool": "golangci-lint-v2",
}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 8027a5344..436275394 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -24,22 +24,24 @@
{
"label": "Run current file integration test",
"type": "shell",
- "command": "go generate pkg/integration/tests/tests.go && go run cmd/integration_test/main.go cli ${relativeFile}",
+ "command": "go run cmd/integration_test/main.go cli ${relativeFile}",
"problemMatcher": [],
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
+ "clear": true,
"focus": true
}
},
{
"label": "Run current file integration test (slow)",
"type": "shell",
- "command": "go generate pkg/integration/tests/tests.go && go run cmd/integration_test/main.go cli --slow ${relativeFile}",
+ "command": "go run cmd/integration_test/main.go cli --slow ${relativeFile}",
"problemMatcher": [],
"group": {
+ "clear": true,
"kind": "test",
},
"presentation": {
@@ -49,12 +51,13 @@
{
"label": "Run current file integration test (sandbox)",
"type": "shell",
- "command": "go generate pkg/integration/tests/tests.go && go run cmd/integration_test/main.go cli --sandbox ${relativeFile}",
+ "command": "go run cmd/integration_test/main.go cli --sandbox ${relativeFile}",
"problemMatcher": [],
"group": {
"kind": "test",
},
"presentation": {
+ "clear": true,
"focus": true
}
},
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a65297f4a..3c2bab21d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -10,6 +10,10 @@ before making a change.
[This video](https://www.youtube.com/watch?v=kNavnhzZHtk) walks through the process of adding a small feature to lazygit. If you have no idea where to start, watching that video is a good first step.
+## Design principles
+
+See [here](./VISION.md) for a set of design principles that we want to consider when building a feature or making a change.
+
## Codebase guide
[This doc](./docs/dev/Codebase_Guide.md) explains:
@@ -114,10 +118,24 @@ Lazygit supports [Nerd Fonts](https://www.nerdfonts.com) to render certain icons
## Internationalisation
-Boy that's a hard word to spell. Anyway, lazygit is translated into several languages within the pkg/i18n package. If you need to render text to the user, you should add a new field to the TranslationSet struct in `pkg/i18n/english.go` and add the actual content within the `EnglishTranslationSet()` method in the same file. Then you can access via `gui.Tr.YourNewText` (or `self.c.Tr.YourNewText`, etc). Although it is appreciated if you translate the text into other languages, it's not expected of you (google translate will likely do a bad job anyway!).
+Boy that's a hard word to spell. Anyway, lazygit is translated into several languages within the pkg/i18n package.
+
+### For developers adding new text
+
+If you need to render text to the user, you should add a new field to the TranslationSet struct in `pkg/i18n/english.go` and add the actual content within the `EnglishTranslationSet()` method in the same file. Then you can access via `gui.Tr.YourNewText` (or `self.c.Tr.YourNewText`, etc).
Note, we use 'Sentence case' for everything (so no 'Title Case' or 'whatever-it's-called-when-there's-no-capital-letters-case')
+### For translators
+
+Lazygit translations are managed through [Crowdin](https://crowdin.com/project/lazygit/). If you'd like to contribute translations:
+
+1. Join the Crowdin project at https://crowdin.com/project/lazygit/
+2. Select your target language and help translate missing strings
+3. The translation files in `pkg/i18n/translations/` are managed by the maintainers - please don't edit them directly
+
+For detailed information about the translation process, including how maintainers sync translations, see `pkg/i18n/translations/README.md`.
+
## Debugging
The easiest way to debug lazygit is to have two terminal tabs open at once: one for running lazygit (via `go run main.go -debug` in the project root) and one for viewing lazygit's logs (which can be done via `go run main.go --logs` or just `lazygit --logs`).
diff --git a/Dockerfile b/Dockerfile
index 6ddba8414..796787a6d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,7 @@
# docker build -t lazygit .
# docker run -it lazygit:latest /bin/sh
-FROM golang:1.22 as build
+FROM golang:1.24 as build
WORKDIR /go/src/github.com/jesseduffield/lazygit/
COPY go.mod go.sum ./
RUN go mod download
diff --git a/Makefile b/Makefile
index ca490a94a..513221129 100644
--- a/Makefile
+++ b/Makefile
@@ -34,13 +34,15 @@ test: unit-test integration-test-all
generate:
go generate ./...
+# If you execute `gofumpt -l -w .`, it will format all Go files in the current directory, including `test/_results/*` files.
+# We pass only Git-tracked Go files to gofumpt because we don't want to format the test results or get errors from it.
.PHONY: format
format:
- gofumpt -l -w .
+ git ls-files '*.go' ':!vendor' | xargs gofumpt -l -w
.PHONY: lint
lint:
- golangci-lint run
+ ./scripts/golangci-lint-shim.sh run
# For more details about integration test, see https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md.
.PHONY: integration-test-tui
diff --git a/README.md b/README.md
index 890d2c7c7..09385d3fb 100644
--- a/README.md
+++ b/README.md
@@ -4,20 +4,32 @@
-

+
- Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
+ Warp, the intelligent terminal
+
+ Available for MacOS and Linux
+
Visit warp.dev to learn more.
+
+
+

+
+ Tuple, the premier screen sharing app for developers on macOS and Windows.
+
+
+
+
-

+
- I (Jesse) co-founded Subble to save your company time and money by helping you manage its software subscriptions. Check it out!
+ I (Jesse) co-founded Subble to save your company time and money by finding unused and over-provisioned SaaS licences. Check it out!
@@ -33,7 +45,7 @@
A simple terminal UI for git commands
-[](https://github.com/jesseduffield/lazygit/releases) [](https://goreportcard.com/report/github.com/jesseduffield/lazygit) [](https://app.codacy.com/gh/jesseduffield/lazygit/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://app.codacy.com/gh/jesseduffield/lazygit/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage) [](https://golangci.com) [](https://github.com/jesseduffield/lazygit/releases/latest) [](https://github.com/Homebrew/homebrew-core/blob/master/Formula/lazygit.rb)
+[](https://github.com/jesseduffield/lazygit/releases) [](https://goreportcard.com/report/github.com/jesseduffield/lazygit) [](https://app.codacy.com/gh/jesseduffield/lazygit/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://app.codacy.com/gh/jesseduffield/lazygit/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage) [](https://golangci-lint.run/) [](https://github.com/jesseduffield/lazygit/releases/latest) [](https://formulae.brew.sh/formula/lazygit)

@@ -46,7 +58,7 @@ A simple terminal UI for git commands
-





























































































+


































































































## Elevator Pitch
@@ -78,6 +90,7 @@ If you're a mere mortal like me and you're tired of hearing how powerful git is
- [Tutorials](#tutorials)
- [Installation](#installation)
- [Binary Releases](#binary-releases)
+ - [Dev container](#dev-container-feature)
- [Homebrew](#homebrew)
- [MacPorts](#macports)
- [Void Linux](#void-linux)
@@ -85,7 +98,7 @@ If you're a mere mortal like me and you're tired of hearing how powerful git is
- [Arch Linux](#arch-linux)
- [Fedora and RHEL](#fedora-and-rhel)
- [Solus Linux](#solus-linux)
- - [Ubuntu](#ubuntu)
+ - [Debian and Ubuntu](#debian-and-ubuntu)
- [Funtoo Linux](#funtoo-linux)
- [Gentoo Linux](#gentoo-linux)
- [FreeBSD](#freebsd)
@@ -123,7 +136,7 @@ Press space on the selected line to stage it, or press `v` to start selecting a
### Interactive Rebase
-Press `i` to start an interactive rebase. Then squash (`s`), fixup (`f`), drop (`d`), edit (`e`), move up (`ctrl+i`) or move down (`ctrl+j`) any of TODO commits, before continuing the rebase by bringing up the rebase options menu with `m` and then selecting `continue`.
+Press `i` to start an interactive rebase. Then squash (`s`), fixup (`f`), drop (`d`), edit (`e`), move up (`ctrl+k`) or move down (`ctrl+j`) any of TODO commits, before continuing the rebase by bringing up the rebase options menu with `m` and then selecting `continue`.
You can also perform any these actions as a once-off (e.g. pressing `s` on a commit to squash it) without explicitly starting a rebase.
@@ -145,7 +158,7 @@ Press `b` in the commits view to mark a commit as good/bad in order to begin a g
### Nuke the working tree
-For when you really want to just get rid of anything that shows up when you run `git status` (and yes that includes dirty submodules) [kidpix style](https://www.youtube.com/watch?v=Ur7_A4JusMU), press `shift+d` to bring up the reset options menu and then select the 'nuke' option.
+For when you really want to just get rid of anything that shows up when you run `git status` (and yes that includes dirty submodules) [kidpix style](https://www.youtube.com/watch?v=N4E2B_k2Bss), press `shift+d` to bring up the reset options menu and then select the 'nuke' option.

@@ -191,7 +204,7 @@ Say you're on a feature branch that was itself branched off of the develop branc
### Undo
-You can undo the last action by pressing 'z' and redo with `ctrl+z`. Here we drop a couple of commits and then undo the actions.
+You can undo the last action by pressing `z` and redo with `ctrl+z`. Here we drop a couple of commits and then undo the actions.
Undo uses the reflog which is specific to commits and branches so we can't undo changes to the working tree or stash.
[More info](/docs/Undoing.md)
@@ -200,7 +213,7 @@ Undo uses the reflog which is specific to commits and branches so we can't undo
### Commit graph
-When viewing the commit graph in an enlarged window (use `+` and `_` to cycle window sizes), the commit graph is shown. Colours correspond to the commit authors, and as you navigate down the graph, the parent commits of the selected commit are highlighted.
+When viewing the commit graph in an enlarged window (use `+` and `_` to cycle screen modes), the commit graph is shown. Colours correspond to the commit authors, and as you navigate down the graph, the parent commits of the selected commit are highlighted.

@@ -220,7 +233,7 @@ If you press `shift+w` on a commit (or branch/ref) a menu will open that allows
## Installation
-[](https://repology.org/project/lazygit/versions)
+[](https://repology.org/project/lazygit/versions)
_Most of the above packages are maintained by third parties so be sure to vet them yourself and confirm that the maintainer is a trustworthy looking person who attends local sports games and gives back to their communities with barbeque fundraisers etc_
@@ -228,19 +241,15 @@ _Most of the above packages are maintained by third parties so be sure to vet th
For Windows, Mac OS(10.12+) or Linux, you can download a binary release [here](../../releases).
+### Dev container feature
+
+If you want to use lazygit in e.g. one of your GitHub Codespaces, there is a third-party [dev container feature](https://github.com/GeorgOfenbeck/features/tree/main/src/lazygit-linuxbinary) based on the binary releases mentioned above.
+
### Homebrew
-Normally the lazygit formula can be found in the Homebrew core but we suggest you tap our formula to get the frequently updated one. It works with Linux, too.
+It works with Linux, too.
-Tap:
-
-```
-brew install jesseduffield/lazygit/lazygit
-```
-
-Core:
-
-```
+```sh
brew install lazygit
```
@@ -275,6 +284,14 @@ scoop bucket add extras
scoop install lazygit
```
+### gah (Linux and Mac OS)
+
+You can install `lazygit` using [gah](https://github.com/marverix/gah/):
+
+```sh
+gah install lazygit
+```
+
### Arch Linux
Packages for Arch Linux are available via pacman and AUR (Arch User Repository).
@@ -288,28 +305,42 @@ and the git version which builds from the most recent commit.
Instruction of how to install AUR content can be found here:
-### Fedora and RHEL
+### Fedora / Amazon Linux 2023 / CentOS Stream
-Packages for Fedora/RHEL and CentOS Stream are available via [Copr](https://copr.fedorainfracloud.org/coprs/atim/lazygit/) (Cool Other Package Repo).
+Packages for Fedora, Amazon Linux 2023 and CentOS Stream are available via
+[Copr](https://copr.fedorainfracloud.org/coprs/dejan/lazygit/) (Cool Other Package Repo).
```sh
-sudo dnf copr enable atim/lazygit -y
+sudo dnf copr enable dejan/lazygit
sudo dnf install lazygit
```
+These packages are built using the RPM spec file located here: https://codeberg.org/dejan/rpm-lazygit
+
+You should be able to build RPMs for Fedora 41 or older, and other Fedora derivatives using the
+SRPM (Source RPM) file that you can grab from the latest COPR build.
+
### Solus Linux
```sh
sudo eopkg install lazygit
```
-### Ubuntu
+### Debian and Ubuntu
+
+For **Debian 13 "Trixie", Sid**, and later, or **Ubuntu 25.10 "Questing Quokka"** and later:
```sh
-LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
-curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
+sudo apt install lazygit
+```
+
+For **Debian 12 "Bookworm", Ubuntu 25.04 "Plucky Puffin"** and earlier:
+
+```sh
+LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*')
+curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
-sudo install lazygit /usr/local/bin
+sudo install lazygit -D -t /usr/local/bin/
```
Verify the correct installation of lazygit:
@@ -368,7 +399,7 @@ nix-shell -p lazygit
nix run nixpkgs#lazygit
```
-Or you can add lazygit to you configuration.nix in the environment.systemPackages section.
+Or you can add lazygit to you `configuration.nix` using the `environment.systemPackages` option.
More details can be found via NixOs search [page](https://search.nixos.org/).
### Flox
diff --git a/VISION.md b/VISION.md
new file mode 100644
index 000000000..9ce4c999e
--- /dev/null
+++ b/VISION.md
@@ -0,0 +1,104 @@
+# Vision and Design Principles
+
+## Vision
+
+Lazygit's vision is to be the most enjoyable UI for git.
+
+## Design Principles
+
+There are seven (sometimes contradictory) design principles we follow:
+
+- Discoverability
+- Simplicity
+- Safety
+- Power
+- Speed
+- Conformity with git
+- Think of the codebase
+
+### Discoverability
+
+TUI's are notoriously hard to learn, thanks to limited screen real-estate to provide contextual help and a general lack of effort on the part of developers to make things obvious. We want Lazygit to buck the trend and be easy for a new user to grok.
+
+Examples:
+
+- Clearly document all the features/configuration options
+ - e.g. gifs in the README
+- Document how to solve various git problems with Lazygit
+ - This is something we don't have yet but should: a section in the docs explaining how Lazygit can help you in various scenarios
+- Use tooltips to explain what actions will do
+- Make it easy for users to ask questions and get answers from the community
+- Make it easy to find entities and actions from within Lazygit
+- Use visual elements to make things obvious
+ - e.g. '<-- YOU ARE HERE' label when rebasing
+- Don't require the user to memorise keybindings
+ - e.g. when the user is mid-rebase, we prominently show that the keybinding for viewing rebase options is 'm'
+- When the user performs an action in Lazygit, make the impact obvious
+ - If the affected entity isn't visible, show a toast notification
+- If a keybinding is disabled, give a reason why
+
+### Simplicity
+
+The git CLI is very complex but most git use cases are simple. Lazygit needs to ensure that simple use cases are easy to satisfy.
+
+- Make the most common use cases dead-simple (staging files, committing, pulling/pushing)
+- Don't overwhelm the user with options
+- Use sensible defaults
+- We already have too many configuration options: think hard before adding any new ones
+
+### Safety
+
+It's easy to screw things up in git so Lazygit should try to protect the user from screwing things up.
+
+- Prompt for a confirmation before doing anything that's hard to reverse
+- Make it easy to correct mistakes
+ - e.g. undo action
+ - the escape key should get you out of most transient situations (rebasing, diffing, etc)
+
+## Power
+
+Users shouldn't have to drop down the CLI _too_ often. Lazygit should be able to handle some complex use cases.
+
+- Make complex (but common) CLI flows simple
+ - e.g. interactive rebasing
+- Use the custom commands system to handle the really rare complex edge-cases
+
+### Speed
+
+Pro users should be able to move at lightning speed with Lazygit.
+
+- Always think about the number of keypresses involved in a given UX flow
+- Make lazygit performant and responsive
+- Think about the individual commands being run and how fast they are
+- Startup should be FAST. If you want to run something at startup that is slow, make it non-blocking.
+- Support muscle-memory
+ - Prefer disabling menu items instead of hiding them so that muscle memory can be used to select the desired menu item
+ - Try to make keybinding intuitions to transfer across contexts (e.g. 'd' for destroy)
+ - When changing keybindings in a new release, always consider what will happen if a user does not read the release notes and relies on muscle memory.
+
+### Conformity with git
+
+Satisfying the use-cases of git users is more important than perfectly conforming to git's API, but even obscure parts of git's API were motivated by real use-cases.
+
+- Users should only have to drop down to the git CLI in rare circumstances
+- Honour the git config
+ - Don't override anything set in the git config without the user's permission
+- Work with git, not against it.
+ - Too much magic will get us into trouble
+- Avoid storing Lazygit-specific session state that could instead be stored in git
+- Ensure that Lazygit can represent the state of any repo
+- Sometimes git's default behaviour is just silly and we'll make the call to override but it should be a well-considered decision.
+
+### Think of the codebase
+
+Will somebody PLEASE think of the codebase!
+
+Some features are not worth the added complexity in the codebase. The more this codebase grows, the harder it will be to make the changes that everybody wants.
+
+## Resolving conflicts
+
+Many of the above objectives are directly antithetical to one another. If you add an extra confirmation prompt for the sake of _safety_, you're sacrificing _speed_. If you support toggling various git flags in the name of _power_, you're sacrificing _simplicity_. There are a few things to say here.
+
+When there are conflicts, we need to make a judgement call. In general we should err on the side of safety and simplicity as the default, with the ability for users to make things faster / more powerful either through configuration or separate keybindings.
+
+This does not mean for example that force pushes should be impossible without being manually enabled: force pushes are table stakes for anybody who rebases. But it does mean that a confirmation popup should appear when force pushing.
diff --git a/docs/Config.md b/docs/Config.md
index 432e70186..4bd589fe0 100644
--- a/docs/Config.md
+++ b/docs/Config.md
@@ -31,10 +31,27 @@ to the top of your config file or via [Visual Studio Code settings.json config][
## Default
+This is only meant as a reference for what config options exist, and what their default values are. It is not meant to be copied and pasted into your config file as a whole; that's not a good idea for several reasons. It is recommended to include only those settings in your config file that you actually want to change.
+
```yaml
# Config relating to the Lazygit UI
gui:
+ # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-author-color
+ authorColors: {}
+
+ # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-branch-color
+ branchColorPatterns: {}
+
+ # Custom icons for filenames and file extensions
+ # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-files-icon--color
+ customIcons:
+ # Map of filenames to icon properties (icon and color)
+ filenames: {}
+
+ # Map of file extensions (including the dot) to icon properties (icon and color)
+ extensions: {}
+
# The number of lines you scroll by when scrolling the main window
scrollHeight: 2
@@ -47,10 +64,17 @@ gui:
# One of: 'margin' (default) | 'jump'
scrollOffBehavior: margin
+ # The number of spaces per tab; used for everything that's shown in the main view, but probably mostly relevant for diffs.
+ # Note that when using a pager, the pager has its own tab width setting, so you need to pass it separately in the pager command.
+ tabWidth: 4
+
# If true, capture mouse events.
# When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
mouseEvents: true
+ # If true, do not show a warning when amending a commit.
+ skipAmendWarning: false
+
# If true, do not show a warning when discarding changes in the staging view.
skipDiscardChangeWarning: false
@@ -87,6 +111,14 @@ gui:
# - 'top': split the window vertically (side panel on top, main view below)
enlargedSideViewLocation: left
+ # If true, wrap lines in the staging view to the width of the view. This
+ # makes it much easier to work with diffs that have long lines, e.g.
+ # paragraphs of markdown text.
+ wrapLinesInStagingView: true
+
+ # If true, hunk selection mode will be enabled by default when entering the staging view.
+ useHunkModeInStagingView: true
+
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
language: auto
@@ -161,9 +193,15 @@ gui:
showListFooter: true
# If true, display the files in the file views as a tree. If false, display the files as a flat list.
- # This can be toggled from within Lazygit with the '~' key, but that will not change the default.
+ # This can be toggled from within Lazygit with the '`' key, but that will not change the default.
showFileTree: true
+ # If true, add a "/" root item in the file tree representing the root of the repository. It is only added when necessary, i.e. when there is more than one item at top level.
+ showRootItemInFileTree: true
+
+ # If true, show the number of lines changed per file in the Files view
+ showNumstatInFilesView: false
+
# If true, show a random tip in the command log when Lazygit starts
showRandomTip: true
@@ -176,9 +214,6 @@ gui:
# If true, show jump-to-window keybindings in window titles.
showPanelJumps: true
- # Deprecated: use nerdFontsVersion instead
- showIcons: false
-
# Nerd fonts version to use.
# One of: '2' | '3' | empty string (default)
# If empty, do not show icons.
@@ -211,12 +246,12 @@ gui:
# If 'auto', only split the main window when a file has both staged and unstaged changes
splitDiff: auto
- # Default size for focused window. Window size can be changed from within Lazygit with '+' and '_' (but this won't change the default).
+ # Default size for focused window. Can be changed from within Lazygit with '+' and '_' (but this won't change the default).
# One of: 'normal' (default) | 'half' | 'full'
- windowSize: normal
+ screenMode: normal
# Window border style.
- # One of 'rounded' (default) | 'single' | 'double' | 'hidden'
+ # One of 'rounded' (default) | 'single' | 'double' | 'hidden' | 'bold'
border: rounded
# If true, show a seriously epic explosion animation when nuking the working tree.
@@ -252,6 +287,9 @@ gui:
# If true, jump to the Files panel after applying a stash
switchToFilesAfterStashApply: true
+ # If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead
+ switchTabsWithPanelJumpKeys: false
+
# Config relating to git
git:
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
@@ -265,12 +303,12 @@ git:
# ydiff -p cat -s --wrap --width={{columnWidth}}
pager: ""
- # If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
- useConfig: false
-
# e.g. 'difft --color=always'
externalDiffCommand: ""
+ # If true, Lazygit will use git's `diff.external` config for paging. The advantage over `externalDiffCommand` is that this can be configured per file type in .gitattributes; see https://git-scm.com/docs/gitattributes#_defining_an_external_diff_driver.
+ useExternalDiffGitConfig: false
+
# Config relating to committing
commit:
# If true, pass '--signoff' flag when committing
@@ -308,6 +346,10 @@ git:
# If true, periodically refresh files and submodules
autoRefresh: true
+ # If not "none", lazygit will automatically fast-forward local branches to match their upstream after fetching. Applies to branches that are not the currently checked out branch, and only to those that are strictly behind their upstream (as opposed to diverged).
+ # Possible values: 'none' | 'onlyMainBranches' | 'allBranches'
+ autoForwardBranches: onlyMainBranches
+
# If true, pass the --all arg to git fetch
fetchAll: true
@@ -320,9 +362,18 @@ git:
# Command used when displaying the current branch git log in the main window
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --
- # Command used to display git log of all branches in the main window.
- # Deprecated: User `allBranchesLogCmds` instead.
- allBranchesLogCmd: git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
+ # Commands used to display git log of all branches in the main window, they will be cycled in order of appearance (array of strings)
+ allBranchesLogCmds:
+ - git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
+
+ # If true, git diffs are rendered with the `--ignore-all-space` flag, which ignores whitespace changes. Can be toggled from within Lazygit with ``.
+ ignoreWhitespaceInDiffView: false
+
+ # The number of lines of context to show around each diff hunk. Can be changed from within Lazygit with the `{` and `}` keys.
+ diffContextSize: 3
+
+ # The threshold for considering a file to be renamed, in percent. Can be changed from within Lazygit with the `(` and `)` keys.
+ renameSimilarityThreshold: 50
# If true, do not spawn a separate process when using GPG
overrideGpg: false
@@ -331,12 +382,10 @@ git:
disableForcePushing: false
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
- commitPrefix:
- # pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
- pattern: ""
+ commitPrefix: []
- # 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-commit-message-prefix
+ commitPrefixes: {}
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix
branchPrefix: ""
@@ -351,18 +400,28 @@ git:
# 'topo-order' makes it easier to read the git log graph, but commits may not
# appear chronologically. See https://git-scm.com/docs/
#
- # Deprecated: Configure this with `Log menu -> Commit sort order` ( in the commits window by default).
+ # Can be changed from within Lazygit with `Log menu -> Commit sort order` (`` in the commits window by default).
order: topo-order
# This determines whether the git graph is rendered in the commits panel
# One of 'always' | 'never' | 'when-maximised'
#
- # Deprecated: Configure this with `Log menu -> Show git graph` ( in the commits window by default).
+ # Can be toggled from within lazygit with `Log menu -> Show git graph` (`` in the commits window by default).
showGraph: always
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
showWholeGraph: false
+ # How branches are sorted in the local branches view.
+ # One of: 'date' (default) | 'recency' | 'alphabetical'
+ # Can be changed from within Lazygit with the Sort Order menu (`s`) in the branches panel.
+ localBranchSortOrder: date
+
+ # How branches are sorted in the remote branches view.
+ # One of: 'date' (default) | 'alphabetical'
+ # Can be changed from within Lazygit with the Sort Order menu (`s`) in the remote branches panel.
+ remoteBranchSortOrder: date
+
# When copying commit hashes to the clipboard, truncate them to this
# length. Set to 40 to disable truncation.
truncateCopiedCommitHashesTo: 12
@@ -404,6 +463,9 @@ os:
# window is closed.
editAtLineAndWait: ""
+ # Whether lazygit suspends until an edit process returns
+ editInTerminal: false
+
# For opening a directory in an editor
openDirInEditor: ""
@@ -418,24 +480,6 @@ os:
# Command for opening a link. Should contain "{{link}}".
openLink: ""
- # EditCommand is the command for editing a file.
- # Deprecated: use Edit instead. Note that semantics are different:
- # EditCommand is just the command itself, whereas Edit contains a
- # "{{filename}}" variable.
- editCommand: ""
-
- # EditCommandTemplate is the command template for editing a file
- # Deprecated: use EditAtLine instead.
- editCommandTemplate: ""
-
- # OpenCommand is the command for opening a file
- # Deprecated: use Open instead.
- openCommand: ""
-
- # OpenLinkCommand is the command for opening a link
- # Deprecated: use OpenLink instead.
- openLinkCommand: ""
-
# CopyToClipboardCmd is the command for copying to clipboard.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
copyToClipboardCmd: ""
@@ -444,9 +488,20 @@ os:
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
readFromClipboardCmd: ""
+ # A shell startup file containing shell aliases or shell functions. This will be sourced before running any shell commands, so that shell functions are available in the `:` command prompt or even in custom commands.
+ # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#using-aliases-or-functions-in-shell-commands
+ shellFunctionsFile: ""
+
# If true, don't display introductory popups upon opening Lazygit.
disableStartupPopups: false
+# User-configured commands that can be invoked from within Lazygit
+# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Command_Keybindings.md
+customCommands: []
+
+# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-pull-request-urls
+services: {}
+
# What to do when opening Lazygit outside of a git repo.
# - 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo
# - 'create': initialize a new repo
@@ -462,6 +517,7 @@ keybinding:
universal:
quit: q
quit-alt1:
+ suspendApp:
return:
quitWithoutChangingDirectory: Q
togglePanel:
@@ -475,6 +531,8 @@ keybinding:
scrollRight: L
gotoTop: <
gotoBottom: '>'
+ gotoTop-alt:
+ gotoBottom-alt:
toggleRangeSelect: v
rangeSelectDown:
rangeSelectUp:
@@ -490,6 +548,7 @@ keybinding:
- "3"
- "4"
- "5"
+ focusMainView: "0"
nextMatch: "n"
prevMatch: "N"
startSearch: /
@@ -498,7 +557,10 @@ keybinding:
select:
goInto:
confirm:
+ confirmMenu:
+ confirmSuggestion:
confirmInEditor:
+ confirmInEditor-alt:
remove: d
new: "n"
edit: e
@@ -524,7 +586,7 @@ keybinding:
nextScreenMode: +
prevScreenMode: _
undo: z
- redo:
+ redo: Z
filteringMenu:
diffingMenu: W
diffingMenu-alt:
@@ -560,15 +622,19 @@ keybinding:
openMergeTool: M
openStatusFilter:
copyFileInfoToClipboard: "y"
+ collapseAll: '-'
+ expandAll: =
branches:
createPullRequest: o
viewPullRequestOptions: O
copyPullRequestURL:
checkoutBranchByName: c
forceCheckoutBranch: F
+ checkoutPreviousBranch: '-'
rebaseBranch: r
renameBranch: R
mergeIntoCurrentBranch: M
+ moveCommitsToNewBranch: "N"
viewGitFlowOptions: i
fastForward: f
createTag: T
@@ -603,6 +669,7 @@ keybinding:
openInBrowser: o
viewBisectOptions: b
startInteractiveRebase: i
+ selectCommitsOfCurrentBranch: '*'
amendAttribute:
resetAuthor: a
setAuthor: A
@@ -648,24 +715,57 @@ os:
open: 'open {{filename}}'
```
+## Custom Command for Opening a Link
+
+```yaml
+os:
+ openLink: 'bash -C /path/to/your/shell-script.sh {{link}}'
+```
+
+Specify the external command to invoke when opening URL links (i.e. creating MR/PR in GitLab, BitBucket or GitHub). `{{link}}` will be replaced by the URL to be opened. A simple shell script can be used to further mangle the passed URL.
+
## Custom Command for Copying to and Pasting from Clipboard
+
```yaml
os:
copyToClipboardCmd: ''
```
+
Specify an external command to invoke when copying to clipboard is requested. `{{text}` will be replaced by text to be copied. Default is to copy to system clipboard.
If you are working on a terminal that supports OSC52, the following command will let you take advantage of it:
-```
+
+```yaml
os:
- copyToClipboardCmd: printf "\033]52;c;$(printf {{text}} | base64)\a" > /dev/tty
+ copyToClipboardCmd: printf "\033]52;c;$(printf {{text}} | base64 -w 0)\a" > /dev/tty
+```
+
+For tmux you need to wrap it with the [tmux escape sequence](https://github.com/tmux/tmux/wiki/FAQ#what-is-the-passthrough-escape-sequence-and-how-do-i-use-it), and enable passthrough in tmux config with `set -g allow-passthrough on`:
+
+```yaml
+os:
+ copyToClipboardCmd: printf "\033Ptmux;\033\033]52;c;$(printf {{text}} | base64 -w 0)\a\033\\" > /dev/tty
+```
+
+For the best of both worlds, we can let the command determine if we are running in a tmux session and send the correct sequence:
+
+```yaml
+os:
+ copyToClipboardCmd: >
+ if [[ "$TERM" =~ ^(screen|tmux) ]]; then
+ printf "\033Ptmux;\033\033]52;c;$(printf {{text}} | base64 -w 0)\a\033\\" > /dev/tty
+ else
+ printf "\033]52;c;$(printf {{text}} | base64 -w 0)\a" > /dev/tty
+ fi
```
A custom command for reading from the clipboard can be set using
+
```yaml
os:
readFromClipboardCmd: ''
```
+
It is used, for example, when pasting a commit message into the commit message panel. The command is supposed to output the clipboard content to stdout.
## Configuring File Editing
@@ -679,7 +779,7 @@ os:
editPreset: 'vscode'
```
-Supported presets are `vim`, `nvim`, `nvim-remote`, `lvim`, `emacs`, `nano`, `micro`, `vscode`, `sublime`, `bbedit`, `kakoune`, `helix`, `xcode`, and `zed`. In many cases lazygit will be able to guess the right preset from your $(git config core.editor), or an environment variable such as $VISUAL or $EDITOR.
+Supported presets are `vim`, `nvim`, `nvim-remote`, `lvim`, `emacs`, `nano`, `micro`, `vscode`, `sublime`, `bbedit`, `kakoune`, `helix`, `xcode`, `zed` and `acme`. In many cases lazygit will be able to guess the right preset from your $(git config core.editor), or an environment variable such as $VISUAL or $EDITOR.
`nvim-remote` is an experimental preset for when you have invoked lazygit from within a neovim process, allowing lazygit to open the file from within the parent process rather than spawning a new one.
@@ -698,6 +798,21 @@ The `editInTerminal` option is used to decide whether lazygit needs to suspend i
Contributions of new editor presets are welcome; see the `getPreset` function in [`editor_presets.go`](https://github.com/jesseduffield/lazygit/blob/master/pkg/config/editor_presets.go).
+## Using aliases or functions in shell commands
+
+Lazygit has a command prompt (`:`) for quickly executing shell commands without having to quit lazygit or switch to a different terminal. Most people find it convenient to have their usual shell aliases or shell functions available at this prompt. To achieve this, put your alias definitions in a separate shell startup file (which you source from your normal startup file, i.e. from `.bashrc` or `.zshrc`), and then tell lazygit about this file like so:
+
+```yml
+os:
+ shellFunctionsFile: ~/.my_aliases.sh
+```
+
+For many people it might work well enough to use their entire shell config file (`~/.bashrc` or `~/.zshrc`) as the `shellFunctionsFile`, but these config files typically do a lot more than defining aliases (e.g. initialize the completion system, start an ssh-agent, etc.) and this may unnecessarily delay execution of shell commands.
+
+When using zsh, aliases can't be used here, but functions can. It is easy to convert your existing aliases into functions, just change `alias l="ls -la"` to `l() ls -la`, for example. This way it will work as before both in the shell and in lazygit.
+
+Note that the shell aliases file is not only used when executing shell commands, but also for [custom commands](Custom_Command_Keybindings.md), and when opening a file in the editor.
+
## Overriding default config file location
To override the default config directory, use `CONFIG_DIR="$HOME/.config/lazygit"`. This directory contains the config file in addition to some other files lazygit uses to keep track of state across sessions.
@@ -797,14 +912,38 @@ gui:
## Custom Branch Color
-You can customize the color of branches based on the branch prefix:
+You can customize the color of branches based on branch patterns (regular expressions):
```yaml
gui:
- branchColors:
- 'docs': '#11aaff' # use a light blue for branches beginning with 'docs/'
+ branchColorPatterns:
+ '^docs/': '#11aaff' # use a light blue for branches beginning with 'docs/'
+ 'ISSUE-\d+': '#ff5733' # use a bright orange for branches containing 'ISSUE-'
```
+Note that the regular expressions are not implicitly anchored to the beginning/end of the branch name. If you want to do that, add leading `^` and/or trailing `$` as needed.
+
+## Custom Files Icon & Color
+
+You can customize the icon and color of files based on filenames or extensions:
+
+```yaml
+gui:
+ customIcons:
+ filenames:
+ "CONTRIBUTING.md": { icon: "\uede2", color: "#FEDDEF" }
+ "HACKING.md": { icon: "\uede2", color: "#FEDDEF" }
+ extensions:
+ ".cat":
+ icon: "\U000f011b"
+ color: "#BC4009"
+ ".dog":
+ icon: "\U000f0a43"
+ color: "#B6977E"
+```
+
+Note that there is no support for regular expressions.
+
## Example Coloring

@@ -882,29 +1021,50 @@ Where:
## Predefined commit message prefix
In situations where certain naming pattern is used for branches and commits, pattern can be used to populate commit message with prefix that is parsed from the branch name.
+If you define multiple naming patterns, they will be attempted in order until one matches.
-Example:
+Example hitting first match:
- Branch name: feature/AB-123
-- Commit message: [AB-123] Adding feature
+- Generated commit message prefix: [AB-123]
+
+Example hitting second match:
+
+- Branch name: CD-456_fix_problem
+- Generated commit message prefix: (CD-456)
```yaml
git:
commitPrefix:
- pattern: "^\\w+\\/(\\w+-\\w+).*"
- replace: '[$1] '
+ - pattern: "^\\w+\\/(\\w+-\\w+).*"
+ replace: '[$1] '
+ - pattern: "^([^_]+)_.*" # Take all text prior to the first underscore
+ replace: '($1) '
```
-If you want repository-specific prefixes, you can map them with `commitPrefixes`. If you have both `commitPrefixes` defined and an entry in `commitPrefixes` for the current repo, the `commitPrefixes` entry is given higher precedence. Repository folder names must be an exact match.
+If you want repository-specific prefixes, you can map them with `commitPrefixes`. If you have both entries in `commitPrefix` defined and an repository match in `commitPrefixes` for the current repo, the `commitPrefixes` entries will be attempted first. Repository folder names must be an exact match.
```yaml
git:
commitPrefixes:
my_project: # This is repository folder name
- pattern: "^\\w+\\/(\\w+-\\w+).*"
- replace: '[$1] '
+ - pattern: "^\\w+\\/(\\w+-\\w+).*"
+ replace: '[$1] '
+ commitPrefix:
+ - pattern: "^(\\w+)-.*" # A more general match for any leading word
+ replace : '[$1] '
+ - pattern: ".*" # The final fallthrough regex that copies over the whole branch name
+ replace : '[$0] '
```
+> [!IMPORTANT]
+> The way golang regex works is when you use `$n` in the replacement string, where `n` is a number, it puts the nth captured subgroup at that place. If `n` is out of range because there aren't that many capture groups in the regex, it puts an empty string there.
+>
+> So make sure you are capturing group or groups in your regex.
+>
+> For example `^[A-Z]+-\d+$` won't work on branch name like BRANCH-1111
+> But `^([A-Z]+-\d+)$` will
+
## 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.
@@ -912,6 +1072,7 @@ In situations where certain naming pattern is used for branches, this can be use
Example:
Some branches:
+
- jsmith/AB-123
- cwilson/AB-125
@@ -920,6 +1081,15 @@ git:
branchPrefix: "firstlast/"
```
+It's possible to use a dynamic prefix by using the `runCommand` function:
+
+```yaml
+git:
+ branchPrefix: "firstlast/{{ runCommand "date +\"%Y/%-m\"" }}/"
+```
+
+This would produce something like: `firstlast/2025/4/`
+
## Custom git log command
You can override the `git log` command that's used to render the log of the selected branch like so:
diff --git a/docs/Custom_Command_Keybindings.md b/docs/Custom_Command_Keybindings.md
index 432625693..aef9c3500 100644
--- a/docs/Custom_Command_Keybindings.md
+++ b/docs/Custom_Command_Keybindings.md
@@ -1,6 +1,6 @@
# Custom Command Keybindings
-You can add custom command keybindings in your config.yml (accessible by pressing 'o' on the status panel from within lazygit) like so:
+You can add custom command keybindings in your config.yml (accessible by pressing 'e' on the status panel from within lazygit) like so:
```yml
customCommands:
@@ -14,7 +14,7 @@ customCommands:
- key: 'C'
context: 'global'
command: "git commit"
- subprocess: true
+ output: terminal
- key: 'n'
context: 'localBranches'
prompts:
@@ -50,16 +50,14 @@ Custom command keybindings will appear alongside inbuilt keybindings when you vi
For a given custom command, here are the allowed fields:
| _field_ | _description_ | required |
|-----------------|----------------------|-|
-| key | The key to trigger the command. Use a single letter or one of the values from [here](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md) | yes |
+| key | The key to trigger the command. Use a single letter or one of the values from [here](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md). Custom commands without a key specified can be triggered by selecting them from the keybindings (`?`) menu | no |
| command | The command to run (using Go template syntax for placeholder values) | yes |
| context | The context in which to listen for the key (see [below](#contexts)) | yes |
-| subprocess | Whether you want the command to run in a subprocess (e.g. if the command requires user input) | no |
| prompts | A list of prompts that will request user input before running the final command | no |
| loadingText | Text to display while waiting for command to finish | no |
| description | Label for the custom command when displayed in the keybindings menu | no |
-| stream | Whether you want to stream the command's output to the Command Log panel | no |
-| showOutput | Whether you want to show the command's output in a popup within Lazygit | no |
-| outputTitle | The title to display in the popup panel if showOutput is true. If left unset, the command will be used as the title. | no |
+| output | Where the output of the command should go. 'none' discards it, 'terminal' suspends lazygit and runs the command in the terminal (useful for commands that require user input), 'log' streams it to the command log, 'logWithPty' is like 'log' but runs the command in a pseudo terminal (can be useful for commands that produce colored output when the output is a terminal), and 'popup' shows it in a popup. | no |
+| outputTitle | The title to display in the popup panel if output is set to 'popup'. If left unset, the command will be used as the title. | no |
| after | Actions to take after the command has completed | no |
Here are the options for the `after` key:
@@ -297,6 +295,7 @@ Your commands can contain placeholder strings using Go's [template syntax](https
```
SelectedCommit
+SelectedCommitRange
SelectedFile
SelectedPath
SelectedLocalBranch
@@ -314,13 +313,57 @@ CheckedOutBranch
To see what fields are available on e.g. the `SelectedFile`, see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/gui/services/custom_commands/models.go) (all the modelling lives in the same file).
+We don't support accessing all elements of a range selection yet. We might add this in the future, but as a special case you can access the range of selected commits by using `SelectedCommitRange`, which has two properties `.To` and `.From` which are the hashes of the bottom and top selected commits, respectively. This is useful for passing them to a git command that operates on a range of commits. For example, to create patches for all selected commits, you might use
+```yml
+ command: "git format-patch {{.SelectedCommitRange.From}}^..{{.SelectedCommitRange.To}}"
+```
+
+We support the following functions:
+
+### Quoting
+
+Quote wraps a string in quotes with necessary escaping for the current platform.
+
+```
+git {{.SelectedFile.Name | quote}}
+```
+
+### Running a command
+
+Runs a command and returns the output. If the command outputs more than a single line, it will produce an error.
+
+```
+initialValue: "username/{{ runCommand "date +\"%Y/%-m\"" }}/"
+```
+
## Keybinding collisions
If your custom keybinding collides with an inbuilt keybinding that is defined for the same context, only the custom keybinding will be executed. This also applies to the global context. However, one caveat is that if you have a custom keybinding defined on the global context for some key, and there is an in-built keybinding defined for the same key and for a specific context (say the 'files' context), then the in-built keybinding will take precedence. See how to change in-built keybindings [here](https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#keybindings)
+## Menus of custom commands
+
+For custom commands that are not used very frequently it may be preferable to hide them in a menu; you can assign a key to open the menu, and the commands will appear inside. This has the advantage that you don't have to come up with individual unique keybindings for all those commands that you don't use often; the keybindings for the commands in the menu only need to be unique within the menu. Here is an example:
+
+```yml
+customCommands:
+- key: X
+ description: "Copy/paste commits across repos"
+ commandMenu:
+ - key: c
+ command: 'git format-patch --stdout {{.SelectedCommitRange.From}}^..{{.SelectedCommitRange.To}} | pbcopy'
+ context: commits, subCommits
+ description: "Copy selected commits to clipboard"
+ - key: v
+ command: 'pbpaste | git am'
+ context: "commits"
+ description: "Paste selected commits from clipboard"
+```
+
+If you use the commandMenu property, none of the other properties except key and description can be used.
+
## Debugging
-If you want to verify that your command actually does what you expect, you can wrap it in an 'echo' call and set `showOutput: true` so that it doesn't actually execute the command but you can see how the placeholders were resolved.
+If you want to verify that your command actually does what you expect, you can wrap it in an 'echo' call and set `output: popup` so that it doesn't actually execute the command but you can see how the placeholders were resolved.
## More Examples
diff --git a/docs/Custom_Pagers.md b/docs/Custom_Pagers.md
index 915dc70af..77bb25d25 100644
--- a/docs/Custom_Pagers.md
+++ b/docs/Custom_Pagers.md
@@ -10,7 +10,6 @@ Support does not extend to Windows users, because we're making use of a package
git:
paging:
colorArg: always
- useConfig: false
```
the `colorArg` key is for whether you want the `--color=always` arg in your `git diff` command. Some pagers want it set to `always`, others want it set to `never`.
@@ -54,17 +53,6 @@ git:
Be careful with this one, I think the homebrew and pip versions are behind master. I needed to directly download the ydiff script to get the no-pager functionality working.
-## Using git config
-
-```yaml
-git:
- paging:
- colorArg: always
- useConfig: true
-```
-
-If you set `useConfig: true`, lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
-
## Using external diff commands
Some diff tools can't work as a simple pager like the ones above do, because they need access to the entire diff, so just post-processing git's diff is not enough for them. The most notable example is probably [difftastic](https://difftastic.wilfred.me.uk).
@@ -77,7 +65,7 @@ git:
externalDiffCommand: difft --color=always
```
-The `colorArg`, `pager`, and `useConfig` options are not used in this case.
+The `colorArg` and `pager` options are not used in this case.
You can add whatever extra arguments you prefer for your difftool; for instance
@@ -86,3 +74,13 @@ git:
paging:
externalDiffCommand: difft --color=always --display=inline --syntax-highlight=off
```
+
+Instead of setting this command in lazygit's `externalDiffCommand` config, you can also tell lazygit to use the external diff command that is configured in git itself (`diff.external`), by using
+
+```yaml
+git:
+ paging:
+ useExternalDiffGitConfig: true
+```
+
+This can be useful if you also want to use it for diffs on the command line, and it also has the advantage that you can configure it per file type in `.gitattributes`; see https://git-scm.com/docs/gitattributes#_defining_an_external_diff_driver.
diff --git a/docs/dev/Busy.md b/docs/dev/Busy.md
index 17c5dc80b..6aa3b7bb5 100644
--- a/docs/dev/Busy.md
+++ b/docs/dev/Busy.md
@@ -2,7 +2,7 @@
## The use-case
-This topic deserves its own doc because there there are a few touch points for it. We have a use-case for knowing when Lazygit is idle or busy because integration tests follow the following process:
+This topic deserves its own doc because there are a few touch points for it. We have a use-case for knowing when Lazygit is idle or busy because integration tests follow the following process:
1) press a key
2) wait until Lazygit is idle
3) run assertion / press another key
diff --git a/docs/keybindings/Custom_Keybindings.md b/docs/keybindings/Custom_Keybindings.md
index 698b87e65..a2537f069 100644
--- a/docs/keybindings/Custom_Keybindings.md
+++ b/docs/keybindings/Custom_Keybindings.md
@@ -20,11 +20,15 @@
| `` | Pgup |
| `` | Pgdn |
| `` | ArrowUp |
+| `` | ShiftArrowUp |
| `` | ArrowDown |
+| `` | ShiftArrowDown |
| `` | ArrowLeft |
| `` | ArrowRight |
| `` | Tab |
+| `` | Backtab |
| `` | Enter |
+| `` | AltEnter |
| `` | Esc |
| `` | Backspace |
| `` | CtrlSpace |
diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md
index 214b7359a..01a935102 100644
--- a/docs/keybindings/Keybindings_en.md
+++ b/docs/keybindings/Keybindings_en.md
@@ -14,25 +14,26 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_
| `` @ `` | View command log options | View options for the command log e.g. show/hide the command log and focus the command log. |
| `` P `` | Push | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
| `` p `` | Pull | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
-| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
-| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
-| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
-| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
+| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.
The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
+| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.
The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
+| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view.
The default can be changed in the config file with the key 'git.diffContextSize'. |
+| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view.
The default can be changed in the config file with the key 'git.diffContextSize'. |
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
| `` `` | View custom patch options | |
| `` m `` | View merge/rebase options | View options to abort/continue/skip the current merge/rebase. |
| `` R `` | Refresh | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |
| `` + `` | Next screen mode (normal/half/fullscreen) | |
| `` _ `` | Prev screen mode | |
+| `` `` | Cancel | |
| `` ? `` | Open keybindings menu | |
| `` `` | View filter options | View options for filtering the commit log, so that only commits matching the filter are shown. |
| `` W `` | View diffing options | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
| `` `` | View diffing options | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
| `` q `` | Quit | |
-| `` `` | Cancel | |
-| `` `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view. |
+| `` `` | Suspend the application | |
+| `` `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.
The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
| `` z `` | Undo | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
-| `` `` | Redo | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
+| `` Z `` | Redo | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
## List panel navigation
@@ -40,8 +41,8 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_
|-----|--------|-------------|
| `` , `` | Previous page | |
| `` . `` | Next page | |
-| `` < `` | Scroll to top | |
-| `` > `` | Scroll to bottom | |
+| `` < () `` | Scroll to top | |
+| `` > () `` | Scroll to bottom | |
| `` v `` | Toggle range select | |
| `` `` | Range select down | |
| `` `` | Range select up | |
@@ -56,6 +57,7 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
| `` `` | Copy path to clipboard | |
+| `` y `` | Copy to clipboard | |
| `` c `` | Checkout | Checkout file. This replaces the file in your working tree with the version from the selected commit. |
| `` d `` | Remove | Discard this commit's changes to this file. This runs an interactive rebase in the background, so you may get a merge conflict if a later commit also changes this file. |
| `` o `` | Open file | Open file in default application. |
@@ -64,7 +66,10 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_
| `` `` | Toggle file included in patch | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
| `` a `` | Toggle all files | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
| `` `` | Enter file / Toggle directory collapsed | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
-| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
+| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.
The default can be changed in the config file with the key 'gui.showFileTree'. |
+| `` - `` | Collapse all files | Collapse all directories in the files tree |
+| `` = `` | Expand all files | Expand all directories in the file tree |
+| `` 0 `` | Focus main view | |
| `` / `` | Search the current view by text | |
## Commit summary
@@ -87,8 +92,7 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_
| `` R `` | Reword with editor | |
| `` d `` | Drop | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
| `` e `` | Edit (start interactive rebase) | Edit the selected commit. Use this to start an interactive rebase from the selected commit. When already mid-rebase, this will mark the selected commit for editing, which means that upon continuing the rebase, the rebase will pause at the selected commit to allow you to make changes. |
-| `` i `` | Start interactive rebase | Start an interactive rebase for the commits on your branch. This will include all commits from the HEAD commit down to the first merge commit or main branch commit.
-If you would instead like to start an interactive rebase from the selected commit, press `e`. |
+| `` i `` | Start interactive rebase | Start an interactive rebase for the commits on your branch. This will include all commits from the HEAD commit down to the first merge commit or main branch commit.
If you would instead like to start an interactive rebase from the selected commit, press `e`. |
| `` p `` | Pick | Mark the selected commit to be picked (when mid-rebase). This means that the commit will be retained upon continuing the rebase. |
| `` F `` | Create fixup commit | Create 'fixup!' commit for the selected commit. Later on, you can press `S` on this same commit to apply all above fixup commits. |
| `` S `` | Apply fixup commits | Squash all 'fixup!' commits, either above the selected commit, or all in current branch (autosquash). |
@@ -105,9 +109,12 @@ If you would instead like to start an interactive rebase from the selected commi
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | Open commit in browser | |
| `` n `` | Create new branch off of commit | |
+| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
| `` C `` | Copy (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `` to cancel the selection. |
| `` `` | Open external diff tool (git difftool) | |
+| `` * `` | Select commits of current branch | |
+| `` 0 `` | Focus main view | |
| `` `` | View files | |
| `` w `` | View worktree options | |
| `` / `` | Search the current view by text | |
@@ -118,6 +125,7 @@ If you would instead like to start an interactive rebase from the selected commi
|-----|--------|-------------|
| `` `` | Confirm | |
| `` `` | Close/Cancel | |
+| `` `` | Copy to clipboard | |
## Files
@@ -143,12 +151,22 @@ If you would instead like to start an interactive rebase from the selected commi
| `` d `` | Discard | View options for discarding changes to the selected file. |
| `` g `` | View upstream reset options | |
| `` D `` | Reset | View reset options for working tree (e.g. nuking the working tree). |
-| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
+| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.
The default can be changed in the config file with the key 'gui.showFileTree'. |
| `` `` | Open external diff tool (git difftool) | |
| `` M `` | Open external merge tool | Run `git mergetool`. |
| `` f `` | Fetch | Fetch changes from remote. |
+| `` - `` | Collapse all files | Collapse all directories in the files tree |
+| `` = `` | Expand all files | Expand all directories in the file tree |
+| `` 0 `` | Focus main view | |
| `` / `` | Search the current view by text | |
+## Input prompt
+
+| Key | Action | Info |
+|-----|--------|-------------|
+| `` `` | Confirm | |
+| `` `` | Close/Cancel | |
+
## Local branches
| Key | Action | Info |
@@ -157,10 +175,12 @@ If you would instead like to start an interactive rebase from the selected commi
| `` i `` | Show git-flow options | |
| `` `` | Checkout | Checkout selected item. |
| `` n `` | New branch | |
+| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
| `` o `` | Create pull request | |
| `` O `` | View create pull request options | |
| `` `` | Copy pull request URL to clipboard | |
-| `` c `` | Checkout by name | Checkout by name. In the input box you can enter '-' to switch to the last branch. |
+| `` c `` | Checkout by name | Checkout by name. In the input box you can enter '-' to switch to the previous branch. |
+| `` - `` | Checkout previous branch | |
| `` F `` | Force checkout | Force checkout selected branch. This will discard all local changes in your working directory before checking out the selected branch. |
| `` d `` | Delete | View delete options for local/remote branch. |
| `` r `` | Rebase | Rebase the checked-out branch onto the selected branch. |
@@ -172,6 +192,7 @@ If you would instead like to start an interactive rebase from the selected commi
| `` R `` | Rename branch | |
| `` u `` | View upstream options | View options relating to the branch's upstream e.g. setting/unsetting the upstream and resetting to the upstream. |
| `` `` | Open external diff tool (git difftool) | |
+| `` 0 `` | Focus main view | |
| `` `` | View commits | |
| `` w `` | View worktree options | |
| `` / `` | Filter the current view by text | |
@@ -198,6 +219,9 @@ If you would instead like to start an interactive rebase from the selected commi
|-----|--------|-------------|
| `` mouse wheel down (fn+up) `` | Scroll down | |
| `` mouse wheel up (fn+down) `` | Scroll up | |
+| `` `` | Switch view | Switch to other view (staged/unstaged changes). |
+| `` `` | Exit back to side panel | |
+| `` / `` | Search the current view by text | |
## Main panel (patch building)
@@ -206,7 +230,7 @@ If you would instead like to start an interactive rebase from the selected commi
| `` `` | Go to previous hunk | |
| `` `` | Go to next hunk | |
| `` v `` | Toggle range select | |
-| `` a `` | Select hunk | Toggle hunk selection mode. |
+| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. |
| `` `` | Copy selected text to clipboard | |
| `` o `` | Open file | Open file in default application. |
| `` e `` | Edit file | Open file in external editor. |
@@ -221,7 +245,7 @@ If you would instead like to start an interactive rebase from the selected commi
| `` `` | Go to previous hunk | |
| `` `` | Go to next hunk | |
| `` v `` | Toggle range select | |
-| `` a `` | Select hunk | Toggle hunk selection mode. |
+| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. |
| `` `` | Copy selected text to clipboard | |
| `` `` | Stage | Toggle selection staged / unstaged. |
| `` d `` | Discard | When unstaged change is selected, discard the change using `git reset`. When staged change is selected, unstage the change. |
@@ -241,7 +265,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info |
|-----|--------|-------------|
| `` `` | Execute | |
-| `` `` | Close | |
+| `` `` | Close/Cancel | |
| `` / `` | Filter the current view by text | |
## Reflog
@@ -253,10 +277,13 @@ If you would instead like to start an interactive rebase from the selected commi
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | Open commit in browser | |
| `` n `` | Create new branch off of commit | |
+| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
| `` C `` | Copy (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `` to cancel the selection. |
| `` `` | Reset copied (cherry-picked) commits selection | |
| `` `` | Open external diff tool (git difftool) | |
+| `` * `` | Select commits of current branch | |
+| `` 0 `` | Focus main view | |
| `` `` | View commits | |
| `` w `` | View worktree options | |
| `` / `` | Filter the current view by text | |
@@ -275,6 +302,7 @@ If you would instead like to start an interactive rebase from the selected commi
| `` s `` | Sort order | |
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
| `` `` | Open external diff tool (git difftool) | |
+| `` 0 `` | Focus main view | |
| `` `` | View commits | |
| `` w `` | View worktree options | |
| `` / `` | Filter the current view by text | |
@@ -290,6 +318,14 @@ If you would instead like to start an interactive rebase from the selected commi
| `` f `` | Fetch | Fetch updates from the remote repository. This retrieves new commits and branches without merging them into your local branches. |
| `` / `` | Filter the current view by text | |
+## Secondary
+
+| Key | Action | Info |
+|-----|--------|-------------|
+| `` `` | Switch view | Switch to other view (staged/unstaged changes). |
+| `` `` | Exit back to side panel | |
+| `` / `` | Search the current view by text | |
+
## Stash
| Key | Action | Info |
@@ -299,6 +335,7 @@ If you would instead like to start an interactive rebase from the selected commi
| `` d `` | Drop | Remove the stash entry from the stash list. |
| `` n `` | New branch | Create a new branch from the selected stash entry. This works by git checking out the commit that the stash entry was created from, creating a new branch from that commit, then applying the stash entry to the new branch as an additional commit. |
| `` r `` | Rename stash | |
+| `` 0 `` | Focus main view | |
| `` `` | View files | |
| `` w `` | View worktree options | |
| `` / `` | Filter the current view by text | |
@@ -312,6 +349,7 @@ If you would instead like to start an interactive rebase from the selected commi
| `` u `` | Check for update | |
| `` `` | Switch to a recent repo | |
| `` a `` | Show/cycle all branch logs | |
+| `` 0 `` | Focus main view | |
## Sub-commits
@@ -322,10 +360,13 @@ If you would instead like to start an interactive rebase from the selected commi
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | Open commit in browser | |
| `` n `` | Create new branch off of commit | |
+| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
| `` C `` | Copy (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `` to cancel the selection. |
| `` `` | Reset copied (cherry-picked) commits selection | |
| `` `` | Open external diff tool (git difftool) | |
+| `` * `` | Select commits of current branch | |
+| `` 0 `` | Focus main view | |
| `` `` | View files | |
| `` w `` | View worktree options | |
| `` / `` | Search the current view by text | |
@@ -348,12 +389,14 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info |
|-----|--------|-------------|
-| `` `` | Checkout | Checkout the selected tag tag as a detached HEAD. |
+| `` `` | Copy tag to clipboard | |
+| `` `` | Checkout | Checkout the selected tag as a detached HEAD. |
| `` n `` | New tag | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. |
| `` d `` | Delete | View delete options for local/remote tag. |
| `` P `` | Push tag | Push the selected tag to a remote. You'll be prompted to select a remote. |
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
| `` `` | Open external diff tool (git difftool) | |
+| `` 0 `` | Focus main view | |
| `` `` | View commits | |
| `` w `` | View worktree options | |
| `` / `` | Filter the current view by text | |
diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md
index a433e97b6..9215f63dd 100644
--- a/docs/keybindings/Keybindings_ja.md
+++ b/docs/keybindings/Keybindings_ja.md
@@ -1,365 +1,407 @@
_This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go generate ./...` from the project root._
-# Lazygit キーバインド
+# Lazygit キーバインディング
-_Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_
+_凡例:`<c-b>` はctrl+b、`<a-b>` はalt+b、`B` はshift+bを意味します_
## グローバルキーバインド
| Key | Action | Info |
|-----|--------|-------------|
-| `` `` | 最近使用したリポジトリに切り替え | |
-| `` (fn+up/shift+k) `` | メインパネルを上にスクロール | |
-| `` (fn+down/shift+j) `` | メインパネルを下にスクロール | |
-| `` @ `` | コマンドログメニューを開く | View options for the command log e.g. show/hide the command log and focus the command log. |
-| `` P `` | Push | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
-| `` p `` | Pull | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
-| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
-| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
-| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
-| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
-| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
-| `` `` | View custom patch options | |
-| `` m `` | View merge/rebase options | View options to abort/continue/skip the current merge/rebase. |
-| `` R `` | リフレッシュ | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |
-| `` + `` | 次のスクリーンモード (normal/half/fullscreen) | |
-| `` _ `` | 前のスクリーンモード | |
-| `` ? `` | メニューを開く | |
-| `` `` | View filter options | View options for filtering the commit log, so that only commits matching the filter are shown. |
-| `` W `` | 差分メニューを開く | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
-| `` `` | 差分メニューを開く | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
-| `` q `` | 終了 | |
+| `` `` | 最近のリポジトリをチェックアウト | |
+| `` (fn+up/shift+k) `` | メインウィンドウを上にスクロール | |
+| `` (fn+down/shift+j) `` | メインウィンドウを下にスクロール | |
+| `` @ `` | コマンドログオプションを表示 | コマンドログのオプションを表示します(例:コマンドログの表示/非表示、コマンドログへのフォーカスなど)。 |
+| `` P `` | プッシュ | 現在のブランチを対応するアップストリームブランチにプッシュします。アップストリームが設定されていない場合、アップストリームブランチの設定を求められます。 |
+| `` p `` | プル | 現在のブランチのリモートから変更をプルします。アップストリームが設定されていない場合、アップストリームブランチの設定を求められます。 |
+| `` ) `` | リネーム検出の類似度しきい値を上げる | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.
The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
+| `` ( `` | リネーム検出の類似度しきい値を下げる | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.
The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
+| `` } `` | 差分コンテキストサイズを増やす | Increase the amount of the context shown around changes in the diff view.
The default can be changed in the config file with the key 'git.diffContextSize'. |
+| `` { `` | 差分コンテキストサイズを減らす | Decrease the amount of the context shown around changes in the diff view.
The default can be changed in the config file with the key 'git.diffContextSize'. |
+| `` : `` | シェルコマンドを実行 | 実行するシェルコマンドを入力するプロンプトを表示します。 |
+| `` `` | カスタムパッチオプションを表示 | |
+| `` m `` | マージ/リベースオプションを表示 | 現在のマージ/リベースを中止/継続/スキップするオプションを表示します。 |
+| `` R `` | 更新 | Gitの状態を更新します(`git status`、`git branch`などをバックグラウンドで実行してパネルの内容を更新します)。これは`git fetch`を実行しません。 |
+| `` + `` | 次の画面モード(通常/半分/全画面) | |
+| `` _ `` | 前の画面モード | |
| `` `` | キャンセル | |
-| `` `` | 空白文字の差分の表示有無を切り替え | Toggle whether or not whitespace changes are shown in the diff view. |
-| `` z `` | アンドゥ (via reflog) (experimental) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
-| `` `` | リドゥ (via reflog) (experimental) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
+| `` ? `` | キーバインディングメニューを開く | |
+| `` `` | フィルターオプションを表示 | コミットログのフィルタリングオプションを表示し、フィルタに一致するコミットのみを表示します。 |
+| `` W `` | 差分オプションを表示 | 2つのrefの差分に関連するオプションを表示します(例:選択したrefとの差分表示、差分を取るrefの入力、差分方向の反転など)。 |
+| `` `` | 差分オプションを表示 | 2つのrefの差分に関連するオプションを表示します(例:選択したrefとの差分表示、差分を取るrefの入力、差分方向の反転など)。 |
+| `` q `` | 終了 | |
+| `` `` | Suspend the application | |
+| `` `` | 空白表示の切り替え | Toggle whether or not whitespace changes are shown in the diff view.
The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
+| `` z `` | 元に戻す | 最後のgitコマンドを元に戻すために実行するgitコマンドを決定するためにreflogが使用されます。これにはワーキングツリーへの変更は含まれません。コミットのみが考慮されます。 |
+| `` Z `` | やり直す | 最後のgitコマンドをやり直すために実行するgitコマンドを決定するためにreflogが使用されます。これにはワーキングツリーへの変更は含まれません。コミットのみが考慮されます。 |
-## 一覧パネルの操作
+## リストパネルのナビゲーション
| Key | Action | Info |
|-----|--------|-------------|
| `` , `` | 前のページ | |
| `` . `` | 次のページ | |
-| `` < `` | 最上部までスクロール | |
-| `` > `` | 最下部までスクロール | |
+| `` < () `` | 先頭にスクロール | |
+| `` > () `` | 末尾にスクロール | |
| `` v `` | 範囲選択を切り替え | |
-| `` `` | Range select down | |
-| `` `` | Range select up | |
-| `` / `` | 検索を開始 | |
-| `` H `` | 左スクロール | |
-| `` L `` | 右スクロール | |
+| `` `` | 範囲選択を下に | |
+| `` `` | 範囲選択を上に | |
+| `` / `` | 現在のビューをテキストで検索 | |
+| `` H `` | 左にスクロール | |
+| `` L `` | 右にスクロール | |
| `` ] `` | 次のタブ | |
| `` [ `` | 前のタブ | |
-## Stash
+## Input prompt
| Key | Action | Info |
|-----|--------|-------------|
-| `` `` | 適用 | Apply the stash entry to your working directory. |
-| `` g `` | Pop | Apply the stash entry to your working directory and remove the stash entry. |
-| `` d `` | Drop | Remove the stash entry from the stash list. |
-| `` n `` | 新しいブランチを作成 | Create a new branch from the selected stash entry. This works by git checking out the commit that the stash entry was created from, creating a new branch from that commit, then applying the stash entry to the new branch as an additional commit. |
-| `` r `` | Stashを変更 | |
-| `` `` | View files | |
-| `` w `` | View worktree options | |
-| `` / `` | Filter the current view by text | |
-
-## Sub-commits
-
-| Key | Action | Info |
-|-----|--------|-------------|
-| `` `` | コミットのhashをクリップボードにコピー | |
-| `` `` | チェックアウト | Checkout the selected commit as a detached HEAD. |
-| `` y `` | コミットの情報をコピー | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
-| `` o `` | ブラウザでコミットを開く | |
-| `` n `` | コミットにブランチを作成 | |
-| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
-| `` C `` | コミットをコピー (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `` to cancel the selection. |
-| `` `` | Reset copied (cherry-picked) commits selection | |
-| `` `` | Open external diff tool (git difftool) | |
-| `` `` | View files | |
-| `` w `` | View worktree options | |
-| `` / `` | 検索を開始 | |
-
-## Worktrees
-
-| Key | Action | Info |
-|-----|--------|-------------|
-| `` n `` | New worktree | |
-| `` `` | Switch | Switch to the selected worktree. |
-| `` o `` | Open in editor | |
-| `` d `` | Remove | Remove the selected worktree. This will both delete the worktree's directory, as well as metadata about the worktree in the .git directory. |
-| `` / `` | Filter the current view by text | |
+| `` `` | 確認 | |
+| `` `` | 閉じる/キャンセル | |
## コミット
| Key | Action | Info |
|-----|--------|-------------|
-| `` `` | コミットのhashをクリップボードにコピー | |
-| `` `` | Reset copied (cherry-picked) commits selection | |
-| `` b `` | View bisect options | |
-| `` s `` | Squash | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
-| `` f `` | Fixup | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
-| `` r `` | コミットメッセージを変更 | Reword the selected commit's message. |
-| `` R `` | エディタでコミットメッセージを編集 | |
-| `` d `` | コミットを削除 | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
-| `` e `` | Edit (start interactive rebase) | コミットを編集 |
-| `` i `` | Start interactive rebase | Start an interactive rebase for the commits on your branch. This will include all commits from the HEAD commit down to the first merge commit or main branch commit.
-If you would instead like to start an interactive rebase from the selected commit, press `e`. |
-| `` p `` | Pick | Mark the selected commit to be picked (when mid-rebase). This means that the commit will be retained upon continuing the rebase. |
-| `` F `` | Fixupコミットを作成 | このコミットに対するfixupコミットを作成 |
-| `` S `` | Apply fixup commits | Squash all 'fixup!' commits, either above the selected commit, or all in current branch (autosquash). |
+| `` `` | コミットハッシュをクリップボードにコピー | |
+| `` `` | コピーされた(チェリーピックされた)コミットの選択をリセット | |
+| `` b `` | bisectオプションを表示 | |
+| `` s `` | スカッシュ | 選択したコミットをその下のコミットにスカッシュします。スカッシュとは複数のコミットを1つにまとめる操作です。選択したコミットのメッセージが下のコミットに追加されます。 |
+| `` f `` | フィックスアップ | 選択したコミットをその下のコミットにマージします。フィックスアップはスカッシュと似ていますが、選択したコミットのメッセージは破棄され、下のコミットのメッセージのみが保持されます。 |
+| `` r `` | メッセージ変更 | 選択したコミットのメッセージを変更します。 |
+| `` R `` | エディタでメッセージ変更 | |
+| `` d `` | 削除 | 選択したコミットを削除します。これはリベースを通じてブランチからコミットを削除します。コミットが後続のコミットが依存する変更を行っている場合、マージコンフリクトを解決する必要があるかもしれません。 |
+| `` e `` | 編集(対話型リベースを開始) | 選択したコミットを編集します。これを使用して、選択したコミットから対話型リベースを開始します。すでにリベース中の場合、これは選択したコミットを編集用にマークし、リベースを続行すると、リベースは選択したコミットで一時停止して変更を行えるようにします。 |
+| `` i `` | 対話的リベースを開始 | ブランチ上のコミットの対話的リベースを開始します。これには、HEADコミットから最初のマージコミットまたはメインブランチのコミットまでのすべてのコミットが含まれます。
選択したコミットから対話的リベースを開始したい場合は、代わりに `e` を押してください。 |
+| `` p `` | ピック | 選択したコミットをピックするようにマークします(リベース中)。これは、リベースを続行すると、コミットが保持されることを意味します。 |
+| `` F `` | fixupコミットを作成 | 選択したコミットに対する「fixup!」コミットを作成します。fixupコミットは、選択したコミットの修正用コミットです。後で、同じコミットで `S` を押すと、上記のすべてのfixupコミットが適用されます。 |
+| `` S `` | fixupコミットを適用 | すべての「fixup!」コミットを、選択したコミットの上部または現在のブランチ内のすべてをスカッシュします(autosquash)。 |
| `` `` | コミットを1つ下に移動 | |
| `` `` | コミットを1つ上に移動 | |
-| `` V `` | コミットを貼り付け (cherry-pick) | |
-| `` B `` | Mark as base commit for rebase | Select a base commit for the next rebase. When you rebase onto a branch, only commits above the base commit will be brought across. This uses the `git rebase --onto` command. |
-| `` A `` | Amend | ステージされた変更でamendコミット |
-| `` a `` | Amend commit attribute | Set/Reset commit author or set co-author. |
-| `` t `` | Revert | Create a revert commit for the selected commit, which applies the selected commit's changes in reverse. |
-| `` T `` | タグを作成 | Create a new tag pointing at the selected commit. You'll be prompted to enter a tag name and optional description. |
-| `` `` | ログメニューを開く | View options for commit log e.g. changing sort order, hiding the git graph, showing the whole git graph. |
-| `` `` | チェックアウト | Checkout the selected commit as a detached HEAD. |
-| `` y `` | コミットの情報をコピー | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
+| `` V `` | ペースト(チェリーピック) | |
+| `` B `` | リベース用のベースコミットとしてマーク | 次のリベース用のベースコミットを選択します。ブランチにリベースするとき、ベースコミットより上のコミットのみが持ち込まれます。これは `git rebase --onto` コマンドを使用します。 |
+| `` A `` | 修正 | ステージされた変更でコミットを修正します。選択したコミットがHEADコミットの場合、これは `git commit --amend` を実行します。それ以外の場合、コミットはリベースを通じて修正されます。 |
+| `` a `` | コミット属性を修正 | コミット作者の設定/リセットまたは共同作者の設定を行います。 |
+| `` t `` | リバート | 選択したコミットの変更を逆に適用する、リバートコミットを作成します。 |
+| `` T `` | コミットにタグを付ける | 選択したコミットを指すタグを新規作成します。タグ名とオプションの説明を入力するよう促されます。 |
+| `` `` | ログオプションを表示 | コミットログのオプションを表示します(例:並び順の変更、Gitグラフの非表示、Gitグラフ全体の表示)。 |
+| `` `` | チェックアウト(ブランチの切り替え) | 選択したコミットをデタッチドヘッド(特定のブランチに属さない状態)としてチェックアウトします。 |
+| `` y `` | コミット属性をクリップボードにコピー | コミット属性をクリップボードにコピーします(例:ハッシュ、URL、差分、メッセージ、作者)。 |
| `` o `` | ブラウザでコミットを開く | |
-| `` n `` | コミットにブランチを作成 | |
-| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
-| `` C `` | コミットをコピー (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `` to cancel the selection. |
-| `` `` | Open external diff tool (git difftool) | |
-| `` `` | View files | |
-| `` w `` | View worktree options | |
-| `` / `` | 検索を開始 | |
+| `` n `` | コミットから新しいブランチを作成 | |
+| `` N `` | コミットを新しいブランチに移動 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
+| `` g `` | リセット | 選択した項目へのリセットオプション(ソフト/ミックス/ハード)を表示します。各リセットタイプの詳細は次の通りです:
- ソフトリセット:変更を保持し、ステージされた状態にします
- ミックスリセット:変更を保持し、ステージされていない状態にします
- ハードリセット:すべての変更を破棄します |
+| `` C `` | コピー(チェリーピック) | コミットをコピーとしてマークします。ローカルコミットビューで `V` を押すと、コピーしたコミットをチェックアウトしたブランチにペースト(チェリーピック)できます。いつでも `` を押して選択をキャンセルできます。 |
+| `` `` | 外部差分ツールを開く(git difftool) | |
+| `` * `` | 現在のブランチのコミットを選択 | |
+| `` 0 `` | メインビューにフォーカス | |
+| `` `` | ファイルを表示 | |
+| `` w `` | ワークツリーオプションを表示 | |
+| `` / `` | 現在のビューをテキストで検索 | |
## コミットファイル
| Key | Action | Info |
|-----|--------|-------------|
-| `` `` | ファイル名をクリップボードにコピー | |
-| `` c `` | チェックアウト | Checkout file. This replaces the file in your working tree with the version from the selected commit. |
-| `` d `` | Remove | Discard this commit's changes to this file. This runs an interactive rebase in the background, so you may get a merge conflict if a later commit also changes this file. |
-| `` o `` | ファイルを開く | Open file in default application. |
-| `` e `` | Edit | Open file in external editor. |
-| `` `` | Open external diff tool (git difftool) | |
-| `` `` | Toggle file included in patch | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
-| `` a `` | Toggle all files | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
-| `` `` | Enter file / Toggle directory collapsed | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
-| `` ` `` | ファイルツリーの表示を切り替え | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
-| `` / `` | 検索を開始 | |
+| `` `` | パスをクリップボードにコピー | |
+| `` y `` | クリップボードにコピー | |
+| `` c `` | チェックアウト(ブランチの切り替え) | ファイルをチェックアウトします。これにより、作業ツリー内のファイルが選択したコミットのバージョンに置き換えられます。 |
+| `` d `` | 削除 | このコミットのこのファイルへの変更を破棄します。これはバックグラウンドで対話的なリベースを実行するため、後のコミットでもこのファイルが変更されている場合、マージコンフリクトが発生する可能性があります。 |
+| `` o `` | ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 |
+| `` e `` | 編集 | 外部エディタでファイルを開きます。 |
+| `` `` | 外部差分ツールを開く(git difftool) | |
+| `` `` | パッチに含めるファイルを切り替え | ファイルがカスタムパッチに含まれるかどうかを切り替えます。https://github.com/jesseduffield/lazygit#rebase-magic-custom-patchesを参照してください。 |
+| `` a `` | すべてのファイルを切り替え | コミットのすべてのファイルをカスタムパッチに追加/削除します。https://github.com/jesseduffield/lazygit#rebase-magic-custom-patchesを参照してください。 |
+| `` `` | ファイルに入る / ディレクトリの折りたたみを切り替える | ファイルが選択されている場合、そのファイルに入ってカスタムパッチに個々の行を追加/削除できます。ディレクトリが選択されている場合、ディレクトリを切り替えます。 |
+| `` ` `` | ファイルツリービューを切り替え | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.
The default can be changed in the config file with the key 'gui.showFileTree'. |
+| `` - `` | すべてのファイルを折りたたむ | ファイルツリー内のすべてのディレクトリを折りたたみます |
+| `` = `` | すべてのファイルを展開 | ファイルツリー内のすべてのディレクトリを展開します |
+| `` 0 `` | メインビューにフォーカス | |
+| `` / `` | 現在のビューをテキストで検索 | |
-## コミットメッセージ
+## コミット概要
| Key | Action | Info |
|-----|--------|-------------|
| `` `` | 確認 | |
| `` `` | 閉じる | |
+## サブコミット
+
+| Key | Action | Info |
+|-----|--------|-------------|
+| `` `` | コミットハッシュをクリップボードにコピー | |
+| `` `` | チェックアウト(ブランチの切り替え) | 選択したコミットをデタッチドヘッド(特定のブランチに属さない状態)としてチェックアウトします。 |
+| `` y `` | コミット属性をクリップボードにコピー | コミット属性をクリップボードにコピーします(例:ハッシュ、URL、差分、メッセージ、作者)。 |
+| `` o `` | ブラウザでコミットを開く | |
+| `` n `` | コミットから新しいブランチを作成 | |
+| `` N `` | コミットを新しいブランチに移動 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
+| `` g `` | リセット | 選択した項目へのリセットオプション(ソフト/ミックス/ハード)を表示します。各リセットタイプの詳細は次の通りです:
- ソフトリセット:変更を保持し、ステージされた状態にします
- ミックスリセット:変更を保持し、ステージされていない状態にします
- ハードリセット:すべての変更を破棄します |
+| `` C `` | コピー(チェリーピック) | コミットをコピーとしてマークします。ローカルコミットビューで `V` を押すと、コピーしたコミットをチェックアウトしたブランチにペースト(チェリーピック)できます。いつでも `` を押して選択をキャンセルできます。 |
+| `` `` | コピーされた(チェリーピックされた)コミットの選択をリセット | |
+| `` `` | 外部差分ツールを開く(git difftool) | |
+| `` * `` | 現在のブランチのコミットを選択 | |
+| `` 0 `` | メインビューにフォーカス | |
+| `` `` | ファイルを表示 | |
+| `` w `` | ワークツリーオプションを表示 | |
+| `` / `` | 現在のビューをテキストで検索 | |
+
## サブモジュール
| Key | Action | Info |
|-----|--------|-------------|
| `` `` | サブモジュール名をクリップボードにコピー | |
-| `` `` | Enter | サブモジュールを開く |
-| `` d `` | Remove | Remove the selected submodule and its corresponding directory. |
-| `` u `` | Update | サブモジュールを更新 |
-| `` n `` | サブモジュールを新規追加 | |
-| `` e `` | サブモジュールのURLを更新 | |
-| `` i `` | Initialize | サブモジュールを初期化 |
-| `` b `` | View bulk submodule options | |
-| `` / `` | Filter the current view by text | |
+| `` `` | 入る | サブモジュールに入ります。サブモジュールに入った後、``を押して親リポジトリに戻ることができます。 |
+| `` d `` | 削除 | 選択したサブモジュールとそれに対応するディレクトリを削除します。 |
+| `` u `` | 更新 | 選択したサブモジュールを更新します。 |
+| `` n `` | 新しいサブモジュール | |
+| `` e `` | サブモジュールURLを更新 | |
+| `` i `` | 初期化 | 選択したサブモジュールを初期化してフェッチの準備をします。おそらく、続いて「更新」アクションを呼び出してサブモジュールをフェッチしたいでしょう。 |
+| `` b `` | 一括サブモジュールオプションを表示 | |
+| `` / `` | 現在のビューをテキストでフィルタリング | |
+
+## スタッシュ
+
+| Key | Action | Info |
+|-----|--------|-------------|
+| `` `` | 適用 | スタッシュエントリをワーキングディレクトリに適用します。 |
+| `` g `` | ポップ | スタッシュエントリをワーキングディレクトリに適用し、スタッシュエントリを削除します。 |
+| `` d `` | 削除 | スタッシュリストからスタッシュエントリを削除します。 |
+| `` n `` | 新しいブランチ | 選択したスタッシュエントリから新しいブランチを作成します。これは、スタッシュエントリが作成されたコミットをgitがチェックアウトし、そのコミットから新しいブランチを作成した後、スタッシュエントリを追加のコミットとして新しいブランチに適用することで機能します。 |
+| `` r `` | スタッシュの名前を変更 | |
+| `` 0 `` | メインビューにフォーカス | |
+| `` `` | ファイルを表示 | |
+| `` w `` | ワークツリーオプションを表示 | |
+| `` / `` | 現在のビューをテキストでフィルタリング | |
## ステータス
| Key | Action | Info |
|-----|--------|-------------|
-| `` o `` | 設定ファイルを開く | Open file in default application. |
-| `` e `` | 設定ファイルを編集 | Open file in external editor. |
+| `` o `` | 設定ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 |
+| `` e `` | 設定ファイルを編集 | 外部エディタでファイルを開きます。 |
| `` u `` | 更新を確認 | |
-| `` `` | 最近使用したリポジトリに切り替え | |
-| `` a `` | すべてのブランチログを表示 | |
+| `` `` | 最近のリポジトリをチェックアウト | |
+| `` a `` | ブランチログの表示モードを順に切り替え | |
+| `` 0 `` | メインビューにフォーカス | |
+
+## セカンダリ
+
+| Key | Action | Info |
+|-----|--------|-------------|
+| `` `` | ビューを切り替え | 他のビュー(ステージされた変更/ステージされていない変更)に切り替えます。 |
+| `` `` | サイドパネルに戻る | |
+| `` / `` | 現在のビューをテキストで検索 | |
## タグ
| Key | Action | Info |
|-----|--------|-------------|
-| `` `` | チェックアウト | Checkout the selected tag tag as a detached HEAD. |
-| `` n `` | タグを作成 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. |
-| `` d `` | Delete | View delete options for local/remote tag. |
-| `` P `` | タグをpush | Push the selected tag to a remote. You'll be prompted to select a remote. |
-| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
-| `` `` | Open external diff tool (git difftool) | |
-| `` `` | コミットを閲覧 | |
-| `` w `` | View worktree options | |
-| `` / `` | Filter the current view by text | |
+| `` `` | タグをクリップボードにコピー | |
+| `` `` | チェックアウト(ブランチの切り替え) | 選択したタグをデタッチドHEADとしてチェックアウトします。 |
+| `` n `` | 新しいタグを作成 | 現在のコミットから新しいタグを作成します。タグ名とオプションの説明を入力するよう促されます。 |
+| `` d `` | 削除 | ローカル/リモートタグの削除オプションを表示します。 |
+| `` P `` | タグをプッシュ | 選択したタグをリモートにプッシュします。リモートを選択するよう促されます。 |
+| `` g `` | リセット | 選択した項目へのリセットオプション(ソフト/ミックス/ハード)を表示します。各リセットタイプの詳細は次の通りです:
- ソフトリセット:変更を保持し、ステージされた状態にします
- ミックスリセット:変更を保持し、ステージされていない状態にします
- ハードリセット:すべての変更を破棄します |
+| `` `` | 外部差分ツールを開く(git difftool) | |
+| `` 0 `` | メインビューにフォーカス | |
+| `` `` | コミットを表示 | |
+| `` w `` | ワークツリーオプションを表示 | |
+| `` / `` | 現在のビューをテキストでフィルタリング | |
## ファイル
| Key | Action | Info |
|-----|--------|-------------|
-| `` `` | ファイル名をクリップボードにコピー | |
-| `` `` | ステージ/アンステージ | Toggle staged for selected file. |
-| `` `` | ファイルをフィルタ (ステージ/アンステージ) | |
-| `` y `` | Copy to clipboard | |
-| `` c `` | 変更をコミット | Commit staged changes. |
-| `` w `` | pre-commitフックを実行せずに変更をコミット | |
-| `` A `` | 最新のコミットにamend | |
-| `` C `` | gitエディタを使用して変更をコミット | |
-| `` `` | Find base commit for fixup | Find the commit that your current changes are building upon, for the sake of amending/fixing up the commit. This spares you from having to look through your branch's commits one-by-one to see which commit should be amended/fixed up. See docs: |
-| `` e `` | Edit | Open file in external editor. |
-| `` o `` | ファイルを開く | Open file in default application. |
-| `` i `` | ファイルをignore | |
-| `` r `` | ファイルをリフレッシュ | |
-| `` s `` | Stash | Stash all changes. For other variations of stashing, use the view stash options keybinding. |
-| `` S `` | View stash options | View stash options (e.g. stash all, stash staged, stash unstaged). |
-| `` a `` | すべての変更をステージ/アンステージ | Toggle staged/unstaged for all files in working tree. |
-| `` `` | Stage lines / Collapse directory | If the selected item is a file, focus the staging view so you can stage individual hunks/lines. If the selected item is a directory, collapse/expand it. |
-| `` d `` | Discard | View options for discarding changes to the selected file. |
-| `` g `` | View upstream reset options | |
-| `` D `` | Reset | View reset options for working tree (e.g. nuking the working tree). |
-| `` ` `` | ファイルツリーの表示を切り替え | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
-| `` `` | Open external diff tool (git difftool) | |
-| `` M `` | Git mergetoolを開く | Run `git mergetool`. |
-| `` f `` | Fetch | Fetch changes from remote. |
-| `` / `` | 検索を開始 | |
+| `` `` | パスをクリップボードにコピー | |
+| `` `` | ステージ | 選択したファイルのステージ状態を切り替えます。 |
+| `` `` | ステータスでファイルをフィルタリング | |
+| `` y `` | クリップボードにコピー | |
+| `` c `` | コミット | ステージされた変更をコミットします。 |
+| `` w `` | pre-commitフックなしで変更をコミット | |
+| `` A `` | 直前のコミットを修正 | |
+| `` C `` | Gitエディタを使用して変更をコミット | |
+| `` `` | フィックスアップのベースコミットを検索 | 現在の変更が基づいているコミットを見つけて、コミットの修正/フィックスアップを行います。これにより、ブランチのコミットを一つずつ確認して、どのコミットを修正/フィックスアップすべきかを調べる手間が省けます。詳細はドキュメントを参照: |
+| `` e `` | 編集 | 外部エディタでファイルを開きます。 |
+| `` o `` | ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 |
+| `` i `` | ファイルを無視または除外 | |
+| `` r `` | ファイルを更新 | |
+| `` s `` | スタッシュ | すべての変更をスタッシュします。スタッシュの他のバリエーションについては、スタッシュオプションを表示するキーバインディングを使用してください。 |
+| `` S `` | スタッシュオプションを表示 | スタッシュオプション(すべてをスタッシュ、ステージされた変更をスタッシュ、ステージされていない変更をスタッシュなど)を表示します。 |
+| `` a `` | すべてステージ | ワーキングツリー内のすべてのファイルのステージ/アンステージを切り替えます。 |
+| `` `` | 行をステージ / ディレクトリを折りたたむ | 選択された項目がファイルの場合、個々のハンク/行をステージできるようにステージングビューにフォーカスします。選択された項目がディレクトリの場合、ディレクトリを折りたたむ/展開します。 |
+| `` d `` | 破棄 | 選択したファイルの変更を破棄するオプションを表示します。 |
+| `` g `` | アップストリームへのリセットオプションを表示 | |
+| `` D `` | リセット | 作業ツリーのリセットオプション(例:作業ツリーの完全破棄)を表示します。 |
+| `` ` `` | ファイルツリービューを切り替え | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.
The default can be changed in the config file with the key 'gui.showFileTree'. |
+| `` `` | 外部差分ツールを開く(git difftool) | |
+| `` M `` | 外部マージツールを開く | `git mergetool`を実行します。 |
+| `` f `` | フェッチ | リモートから変更をフェッチします。 |
+| `` - `` | すべてのファイルを折りたたむ | ファイルツリー内のすべてのディレクトリを折りたたみます |
+| `` = `` | すべてのファイルを展開 | ファイルツリー内のすべてのディレクトリを展開します |
+| `` 0 `` | メインビューにフォーカス | |
+| `` / `` | 現在のビューをテキストで検索 | |
-## ブランチ
+## メインパネル(ステージング)
| Key | Action | Info |
|-----|--------|-------------|
-| `` `` | ブランチ名をクリップボードにコピー | |
-| `` i `` | Show git-flow options | |
-| `` `` | チェックアウト | Checkout selected item. |
-| `` n `` | 新しいブランチを作成 | |
-| `` o `` | Pull Requestを作成 | |
-| `` O `` | View create pull request options | |
-| `` `` | Pull RequestのURLをクリップボードにコピー | |
-| `` c `` | Checkout by name | Checkout by name. In the input box you can enter '-' to switch to the last branch. |
-| `` F `` | Force checkout | Force checkout selected branch. This will discard all local changes in your working directory before checking out the selected branch. |
-| `` d `` | Delete | View delete options for local/remote branch. |
-| `` r `` | Rebase | Rebase the checked-out branch onto the selected branch. |
-| `` M `` | 現在のブランチにマージ | View options for merging the selected item into the current branch (regular merge, squash merge) |
-| `` f `` | Fast-forward | Fast-forward selected branch from its upstream. |
-| `` T `` | タグを作成 | |
-| `` s `` | 並び替え | |
-| `` g `` | Reset | |
-| `` R `` | ブランチ名を変更 | |
-| `` u `` | View upstream options | View options relating to the branch's upstream e.g. setting/unsetting the upstream and resetting to the upstream. |
-| `` `` | Open external diff tool (git difftool) | |
-| `` `` | コミットを閲覧 | |
-| `` w `` | View worktree options | |
-| `` / `` | Filter the current view by text | |
+| `` `` | 前のハンクに移動 | |
+| `` `` | 次のハンクに移動 | |
+| `` v `` | 範囲選択を切り替え | |
+| `` a `` | ハンクの選択を切り替える | Toggle line-by-line vs. hunk selection mode. |
+| `` `` | 選択したテキストをクリップボードにコピー | |
+| `` `` | ステージ | 選択された部分のステージ / アンステージを切り替えます。 |
+| `` d `` | 破棄 | ステージされていない変更が選択されている場合、`git reset`を使用して変更を破棄します。ステージされた変更が選択されている場合、変更をアンステージします。 |
+| `` o `` | ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 |
+| `` e `` | ファイルを編集 | 外部エディタでファイルを開きます。 |
+| `` `` | ファイルパネルに戻る | |
+| `` `` | ビューを切り替え | 他のビュー(ステージされた変更/ステージされていない変更)に切り替えます。 |
+| `` E `` | ハンクを編集 | 選択したハンクを外部エディタで編集します。 |
+| `` c `` | コミット | ステージされた変更をコミットします。 |
+| `` w `` | pre-commitフックなしで変更をコミット | |
+| `` C `` | Gitエディタを使用して変更をコミット | |
+| `` `` | フィックスアップのベースコミットを検索 | 現在の変更が基づいているコミットを見つけて、コミットの修正/フィックスアップを行います。これにより、ブランチのコミットを一つずつ確認して、どのコミットを修正/フィックスアップすべきかを調べる手間が省けます。詳細はドキュメントを参照: |
+| `` / `` | 現在のビューをテキストで検索 | |
-## メインパネル (Merging)
+## メインパネル(パッチ作成)
| Key | Action | Info |
|-----|--------|-------------|
-| `` `` | Pick hunk | |
-| `` b `` | Pick all hunks | |
-| `` `` | 前のhunkを選択 | |
-| `` `` | 次のhunkを選択 | |
-| `` `` | 前のコンフリクトを選択 | |
-| `` `` | 次のコンフリクトを選択 | |
-| `` z `` | アンドゥ | Undo last merge conflict resolution. |
-| `` e `` | ファイルを編集 | Open file in external editor. |
-| `` o `` | ファイルを開く | Open file in default application. |
-| `` M `` | Git mergetoolを開く | Run `git mergetool`. |
-| `` `` | ファイル一覧に戻る | |
+| `` `` | 前のハンクに移動 | |
+| `` `` | 次のハンクに移動 | |
+| `` v `` | 範囲選択を切り替え | |
+| `` a `` | ハンクの選択を切り替える | Toggle line-by-line vs. hunk selection mode. |
+| `` `` | 選択したテキストをクリップボードにコピー | |
+| `` o `` | ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 |
+| `` e `` | ファイルを編集 | 外部エディタでファイルを開きます。 |
+| `` `` | パッチ内の行を切り替え | |
+| `` `` | カスタムパッチビルダーを終了 | |
+| `` / `` | 現在のビューをテキストで検索 | |
-## メインパネル (Normal)
+## メインパネル(マージ中)
+
+| Key | Action | Info |
+|-----|--------|-------------|
+| `` `` | ハンクを選択 | |
+| `` b `` | すべてのハンクを選択 | |
+| `` `` | 前のハンク | |
+| `` `` | 次のハンク | |
+| `` `` | 前のコンフリクト | |
+| `` `` | 次のコンフリクト | |
+| `` z `` | 元に戻す | 最後のマージコンフリクト解決を元に戻します。 |
+| `` e `` | ファイルを編集 | 外部エディタでファイルを開きます。 |
+| `` o `` | ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 |
+| `` M `` | 外部マージツールを開く | `git mergetool`を実行します。 |
+| `` `` | ファイルパネルに戻る | |
+
+## メインパネル(通常)
| Key | Action | Info |
|-----|--------|-------------|
| `` mouse wheel down (fn+up) `` | 下にスクロール | |
| `` mouse wheel up (fn+down) `` | 上にスクロール | |
-
-## メインパネル (Patch Building)
-
-| Key | Action | Info |
-|-----|--------|-------------|
-| `` `` | 前のhunkを選択 | |
-| `` `` | 次のhunkを選択 | |
-| `` v `` | 範囲選択を切り替え | |
-| `` a `` | Hunk選択を切り替え | Toggle hunk selection mode. |
-| `` `` | 選択されたテキストをクリップボードにコピー | |
-| `` o `` | ファイルを開く | Open file in default application. |
-| `` e `` | ファイルを編集 | Open file in external editor. |
-| `` `` | 行をパッチに追加/削除 | |
-| `` `` | Exit custom patch builder | |
-| `` / `` | 検索を開始 | |
-
-## メインパネル (Staging)
-
-| Key | Action | Info |
-|-----|--------|-------------|
-| `` `` | 前のhunkを選択 | |
-| `` `` | 次のhunkを選択 | |
-| `` v `` | 範囲選択を切り替え | |
-| `` a `` | Hunk選択を切り替え | Toggle hunk selection mode. |
-| `` `` | 選択されたテキストをクリップボードにコピー | |
-| `` `` | ステージ/アンステージ | 選択行をステージ/アンステージ |
-| `` d `` | 変更を削除 (git reset) | When unstaged change is selected, discard the change using `git reset`. When staged change is selected, unstage the change. |
-| `` o `` | ファイルを開く | Open file in default application. |
-| `` e `` | ファイルを編集 | Open file in external editor. |
-| `` `` | ファイル一覧に戻る | |
-| `` `` | パネルを切り替え | Switch to other view (staged/unstaged changes). |
-| `` E `` | Edit hunk | Edit selected hunk in external editor. |
-| `` c `` | 変更をコミット | Commit staged changes. |
-| `` w `` | pre-commitフックを実行せずに変更をコミット | |
-| `` C `` | gitエディタを使用して変更をコミット | |
-| `` `` | Find base commit for fixup | Find the commit that your current changes are building upon, for the sake of amending/fixing up the commit. This spares you from having to look through your branch's commits one-by-one to see which commit should be amended/fixed up. See docs: