diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4eb2a5a2072..65f46ef584f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,6 +70,15 @@ jobs: exit 1 fi + - name: Check that docs and schema are up to date + run: | + if diff -r -q docs docs-master > /dev/null && diff -r -q schema schema-master > /dev/null; then + echo "Docs and schema are up to date." + else + echo "Docs or schema are out of date. Please run 'scripts/update_docs_for_release.sh' and make a PR." + exit 1 + fi + - name: Check for Blocking Issues/PRs if: ${{ !inputs.ignore_blocks }} id: check_blocks diff --git a/docs-master/Config.md b/docs-master/Config.md new file mode 100644 index 00000000000..67198627d34 --- /dev/null +++ b/docs-master/Config.md @@ -0,0 +1,1190 @@ +# User Config + +Default path for the global config file: + +- Linux: `~/.config/lazygit/config.yml` +- MacOS: `~/Library/Application\ Support/lazygit/config.yml` +- Windows: `%LOCALAPPDATA%\lazygit\config.yml` (default location, but it will also be found in `%APPDATA%\lazygit\config.yml` + +For old installations (slightly embarrassing: I didn't realise at the time that you didn't need to supply a vendor name to the path so I just used my name): + +- Linux: `~/.config/jesseduffield/lazygit/config.yml` +- MacOS: `~/Library/Application\ Support/jesseduffield/lazygit/config.yml` +- Windows: `%APPDATA%\jesseduffield\lazygit\config.yml` + +If you want to change the config directory: + +- MacOS: `export XDG_CONFIG_HOME="$HOME/.config"` + +In addition to the global config file you can create repo-specific config files in `/.git/lazygit.yml`. Settings in these files override settings in the global config file. In addition, files called `.lazygit.yml` in any of the parent directories of a repo will also be loaded; this can be useful if you have settings that you want to apply to a group of repositories. + +JSON schema is available for `config.yml` so that IntelliSense in Visual Studio Code (completion and error checking) is automatically enabled when the [YAML Red Hat][yaml] extension is installed. However, note that automatic schema detection only works if your config file is in one of the standard paths mentioned above. If you override the path to the file, you can still make IntelliSense work by adding + +```yaml +# yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json +``` + +to the top of your config file or via [Visual Studio Code settings.json config][settings]. + +[yaml]: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml +[settings]: https://github.com/redhat-developer/vscode-yaml#associating-a-schema-to-a-glob-pattern-via-yamlschemas + +## 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 + + # If true, allow scrolling past the bottom of the content in the main window + scrollPastBottom: true + + # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin + scrollOffMargin: 2 + + # 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 + + # If true, do not show warning when applying/popping the stash + skipStashWarning: false + + # If true, do not show a warning when attempting to commit without any staged + # files; instead stage all unstaged files. + skipNoStagedFilesWarning: false + + # If true, do not show a warning when rewording a commit via an external editor + skipRewordInEditorWarning: false + + # If true, switch to a different worktree without confirmation when checking out + # a branch that is checked out in that worktree + skipSwitchWorktreeOnCheckoutWarning: false + + # Fraction of the total screen width to use for the left side section. You may + # want to pick a small number (e.g. 0.2) if you're using a narrow screen, so + # that you can see more of the main section. + # Number from 0 to 1.0. + sidePanelWidth: 0.3333 + + # If true, increase the height of the focused side window; creating an accordion + # effect. + expandFocusedSidePanel: false + + # The weight of the expanded side panel, relative to the other panels. 2 means + # twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` + # is true. + expandedSidePanelWeight: 2 + + # Sometimes the main window is split in two (e.g. when the selected file has + # both staged and unstaged changes). This setting controls how the two sections + # are split. + # Options are: + # - 'horizontal': split the window horizontally + # - 'vertical': split the window vertically + # - 'flexible': (default) split the window horizontally if the window is wide + # enough, otherwise split vertically + mainPanelSplitMode: flexible + + # How the window is split when in half screen mode (i.e. after hitting '+' + # once). + # Possible values: + # - 'left': split the window horizontally (side panel on the left, main view on + # the right) + # - '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' | 'pt' + language: auto + + # Format used when displaying time e.g. commit time. + # Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format + timeFormat: 02 Jan 06 + + # Format used when displaying time if the time is less than 24 hours ago. + # Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format + shortTimeFormat: 3:04PM + + # Config relating to colors and styles. + # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes + theme: + # Border color of focused window + activeBorderColor: + - green + - bold + + # Border color of non-focused windows + inactiveBorderColor: + - default + + # Border color of focused window when searching in that window + searchingActiveBorderColor: + - cyan + - bold + + # Color of keybindings help text in the bottom line + optionsTextColor: + - blue + + # Background color of selected line. + # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#highlighting-the-selected-line + selectedLineBgColor: + - blue + + # Background color of selected line when view doesn't have focus. + inactiveViewSelectedLineBgColor: + - bold + + # Foreground color of copied commit + cherryPickedCommitFgColor: + - blue + + # Background color of copied commit + cherryPickedCommitBgColor: + - cyan + + # Foreground color of marked base commit (for rebase) + markedBaseCommitFgColor: + - blue + + # Background color of marked base commit (for rebase) + markedBaseCommitBgColor: + - yellow + + # Color for file with unstaged changes + unstagedChangesColor: + - red + + # Default text color + defaultFgColor: + - default + + # Config relating to the commit length indicator + commitLength: + # If true, show an indicator of commit message length + show: true + + # If true, show the '5 of 20' footer at the bottom of list views + 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. + 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 + + # If true, show the command log + showCommandLog: true + + # If true, show the bottom line that contains keybinding info and useful + # buttons. If false, this line will be hidden except to display a loader for an + # in-progress action. + showBottomLine: true + + # If true, show jump-to-window keybindings in window titles. + showPanelJumps: true + + # Nerd fonts version to use. + # One of: '2' | '3' | empty string (default) + # If empty, do not show icons. + nerdFontsVersion: "" + + # If true (default), file icons are shown in the file views. Only relevant if + # NerdFontsVersion is not empty. + showFileIcons: true + + # Length of author name in (non-expanded) commits view. 2 means show initials + # only. + commitAuthorShortLength: 2 + + # Length of author name in expanded commits view. 2 means show initials only. + commitAuthorLongLength: 17 + + # Length of commit hash in commits view. 0 shows '*' if NF icons aren't on. + commitHashLength: 8 + + # If true, show commit hashes alongside branch names in the branches view. + showBranchCommitHash: false + + # Whether to show the divergence from the base branch in the branches view. + # One of: 'none' | 'onlyArrow' | 'arrowAndNumber' + showDivergenceFromBaseBranch: none + + # Height of the command log view + commandLogSize: 8 + + # Whether to split the main window when viewing file changes. + # One of: 'auto' | 'always' + # If 'auto', only split the main window when a file has both staged and unstaged + # changes + splitDiff: auto + + # 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' + screenMode: normal + + # Window border style. + # One of 'rounded' (default) | 'single' | 'double' | 'hidden' | 'bold' + border: rounded + + # If true, show a seriously epic explosion animation when nuking the working + # tree. + animateExplosion: true + + # Whether to stack UI components on top of each other. + # One of 'auto' (default) | 'always' | 'never' + portraitMode: auto + + # How things are filtered when typing '/'. + # One of 'substring' (default) | 'fuzzy' + filterMode: substring + + # Config relating to the spinner. + spinner: + # The frames of the spinner animation. + frames: + - '|' + - / + - '-' + - \ + + # The "speed" of the spinner in milliseconds. + rate: 50 + + # Status panel view. + # One of 'dashboard' (default) | 'allBranchesLog' + statusPanelView: dashboard + + # If true, jump to the Files panel after popping a stash + switchToFilesAfterStashPop: true + + # 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: + # Array of pagers. Each entry has the following format: + # + # # Value of the --color arg in the git diff command. Some pagers want + # # this to be set to 'always' and some want it set to 'never' + # colorArg: "always" + # + # # e.g. + # # diff-so-fancy + # # delta --dark --paging=never + # # ydiff -p cat -s --wrap --width={{columnWidth}} + # pager: "" + # + # # 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 + # + # See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md + # for more information. + pagers: [] + + # Config relating to committing + commit: + # If true, pass '--signoff' flag when committing + signOff: false + + # Automatic WYSIWYG wrapping of the commit message as you type + autoWrapCommitMessage: true + + # If autoWrapCommitMessage is true, the width to wrap to + autoWrapWidth: 72 + + # Config relating to merging + merging: + # If true, run merges in a subprocess so that if a commit message is required, + # Lazygit will not hang + # Only applicable to unix users. + manualCommit: false + + # Extra args passed to `git merge`, e.g. --no-ff + args: "" + + # The commit message to use for a squash merge commit. Can contain + # "{{selectedRef}}" and "{{currentBranch}}" placeholders. + squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}} + + # list of branches that are considered 'main' branches, used when displaying + # commits + mainBranches: + - master + - main + + # Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks + # will be skipped when the commit message starts with 'WIP' + skipHookPrefix: WIP + + # If true, periodically fetch from remote + autoFetch: true + + # 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 + + # If true, lazygit will automatically stage files that used to have merge + # conflicts but no longer do; and it will also ask you if you want to continue a + # merge or rebase if you've resolved all conflicts. If false, it won't do either + # of these things. + autoStageResolvedConflicts: true + + # 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}} -- + + # 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 + + # If true, do not allow force pushes + disableForcePushing: false + + # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix + commitPrefix: [] + + # 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: "" + + # If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀 + # (This should really be under 'gui', not 'git') + parseEmoji: false + + # Config for showing the log in the commits view + log: + # One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default' + # 'topo-order' makes it easier to read the git log graph, but commits may not + # appear chronologically. See https://git-scm.com/docs/ + # + # 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' + # + # 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 + +# Periodic update checks +update: + # One of: 'prompt' (default) | 'background' | 'never' + method: prompt + + # Period in days between update checks + days: 14 + +# Background refreshes +refresher: + # File/submodule refresh interval in seconds. + # Auto-refresh can be disabled via option 'git.autoRefresh'. + refreshInterval: 10 + + # Re-fetch interval in seconds. + # Auto-fetch can be disabled via option 'git.autoFetch'. + fetchInterval: 60 + +# If true, show a confirmation popup before quitting Lazygit +confirmOnQuit: false + +# If true, exit Lazygit when the user presses escape in a context where there is +# nothing to cancel/close +quitOnTopLevelReturn: false + +# Config relating to things outside of Lazygit like how files are opened, +# copying to clipboard, etc +os: + # Command for editing a file. Should contain "{{filename}}". + edit: "" + + # Command for editing a file at a given line number. Should contain + # "{{filename}}", and may optionally contain "{{line}}". + editAtLine: "" + + # Same as EditAtLine, except that the command needs to wait until the window is + # closed. + editAtLineAndWait: "" + + # Whether lazygit suspends until an edit process returns + editInTerminal: false + + # For opening a directory in an editor + openDirInEditor: "" + + # A built-in preset that sets all of the above settings. Supported presets are + # defined in the getPreset function in editor_presets.go. + editPreset: "" + + # Command for opening a file, as if the file is double-clicked. Should contain + # "{{filename}}", but doesn't support "{{line}}". + open: "" + + # Command for opening a link. Should contain "{{link}}". + openLink: "" + + # 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: "" + + # ReadFromClipboardCmd is the command for reading the clipboard. + # 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 +# - 'skip': open most recent repo +# - 'quit': exit Lazygit +notARepository: prompt + +# If true, display a confirmation when subprocess terminates. This allows you to +# view the output of the subprocess before returning to Lazygit. +promptToReturnFromSubprocess: true + +# Keybindings +keybinding: + universal: + quit: q + quit-alt1: + suspendApp: + return: + quitWithoutChangingDirectory: Q + togglePanel: + prevItem: + nextItem: + prevItem-alt: k + nextItem-alt: j + prevPage: ',' + nextPage: . + scrollLeft: H + scrollRight: L + gotoTop: < + gotoBottom: '>' + gotoTop-alt: + gotoBottom-alt: + toggleRangeSelect: v + rangeSelectDown: + rangeSelectUp: + prevBlock: + nextBlock: + prevBlock-alt: h + nextBlock-alt: l + nextBlock-alt2: + prevBlock-alt2: + jumpToBlock: + - "1" + - "2" + - "3" + - "4" + - "5" + focusMainView: "0" + nextMatch: "n" + prevMatch: "N" + startSearch: / + optionMenu: + optionMenu-alt1: '?' + select: + goInto: + confirm: + confirmMenu: + confirmSuggestion: + confirmInEditor: + confirmInEditor-alt: + remove: d + new: "n" + edit: e + openFile: o + scrollUpMain: + scrollDownMain: + scrollUpMain-alt1: K + scrollDownMain-alt1: J + scrollUpMain-alt2: + scrollDownMain-alt2: + executeShellCommand: ':' + createRebaseOptionsMenu: m + + # 'Files' appended for legacy reasons + pushFiles: P + + # 'Files' appended for legacy reasons + pullFiles: p + refresh: R + createPatchOptionsMenu: + nextTab: ']' + prevTab: '[' + nextScreenMode: + + prevScreenMode: _ + cyclePagers: '|' + undo: z + redo: Z + filteringMenu: + diffingMenu: W + diffingMenu-alt: + copyToClipboard: + openRecentRepos: + submitEditorText: + extrasMenu: '@' + toggleWhitespaceInDiffView: + increaseContextInDiffView: '}' + decreaseContextInDiffView: '{' + increaseRenameSimilarityThreshold: ) + decreaseRenameSimilarityThreshold: ( + openDiffTool: + status: + checkForUpdate: u + recentRepos: + allBranchesLogGraph: a + files: + commitChanges: c + commitChangesWithoutHook: w + amendLastCommit: A + commitChangesWithEditor: C + findBaseCommitForFixup: + confirmDiscard: x + ignoreFile: i + refreshFiles: r + stashAllChanges: s + viewStashOptions: S + toggleStagedAll: a + viewResetOptions: D + fetch: f + toggleTreeView: '`' + openMergeOptions: 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 + pushTag: P + setUpstream: u + fetchRemote: f + sortOrder: s + worktrees: + viewWorktreeOptions: w + commits: + squashDown: s + renameCommit: r + renameCommitWithEditor: R + viewResetOptions: g + markCommitAsFixup: f + createFixupCommit: F + squashAboveCommits: S + moveDownCommit: + moveUpCommit: + amendToCommit: A + resetCommitAuthor: a + pickCommit: p + revertCommit: t + cherryPickCopy: C + pasteCommits: V + markCommitAsBaseForRebase: B + tagCommit: T + checkoutCommit: + resetCherryPick: + copyCommitAttributeToClipboard: "y" + openLogMenu: + openInBrowser: o + viewBisectOptions: b + startInteractiveRebase: i + selectCommitsOfCurrentBranch: '*' + amendAttribute: + resetAuthor: a + setAuthor: A + addCoAuthor: c + stash: + popStash: g + renameStash: r + commitFiles: + checkoutCommitFile: c + main: + toggleSelectHunk: a + pickBothHunks: b + editSelectHunk: E + submodules: + init: i + update: u + bulkMenu: b + commitMessage: + commitMenu: +``` + + +## Platform Defaults + +### Windows + +```yaml +os: + open: 'start "" {{filename}}' +``` + +### Linux + +```yaml +os: + open: 'xdg-open {{filename}} >/dev/null' +``` + +### OSX + +```yaml +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 -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 + +There are two commands for opening files, `o` for "open" and `e` for "edit". `o` acts as if the file was double-clicked in the Finder/Explorer, so it also works for non-text files, whereas `e` opens the file in an editor. `e` can also jump to the right line in the file if you invoke it from the staging panel, for example. + +To tell lazygit which editor to use for the `e` command, the easiest way to do that is to provide an editPreset config, e.g. + +```yaml +os: + editPreset: 'vscode' +``` + +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. + +If for some reason you are not happy with the default commands from a preset, or there simply is no preset for your editor, you can customize the commands by setting the `edit`, `editAtLine`, and `editAtLineAndWait` options, e.g.: + +```yaml +os: + edit: 'myeditor {{filename}}' + editAtLine: 'myeditor --line={{line}} {{filename}}' + editAtLineAndWait: 'myeditor --block --line={{line}} {{filename}}' + editInTerminal: true + openDirInEditor: 'myeditor {{dir}}' +``` + +The `editInTerminal` option is used to decide whether lazygit needs to suspend itself to the background before calling the editor. It should really be named `suspend` because for some cases like when lazygit is opened from within a neovim session and you're using the `nvim-remote` preset, you're technically still in a terminal. Nonetheless we're sticking with the name `editInTerminal` for backwards compatibility. + +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. + +To override the individual config file used, use the `--use-config-file` arg or the `LG_CONFIG_FILE` env var. + +If you want to merge a specific config file into a more general config file, perhaps for the sake of setting some theme-specific options, you can supply a list of comma-separated config file paths, like so: + +```sh +lazygit --use-config-file="$HOME/.base_lg_conf,$HOME/.light_theme_lg_conf" +or +LG_CONFIG_FILE="$HOME/.base_lg_conf,$HOME/.light_theme_lg_conf" lazygit +``` + +## Scroll-off Margin + +When the selected line gets close to the bottom of the window and you hit down-arrow, there's a feature called "scroll-off margin" that lets the view scroll a little earlier so that you can see a bit of what's coming in the direction that you are moving. This is controlled by the `gui.scrollOffMargin` setting (default: 2), so it keeps 2 lines below the selection visible as you scroll down. It can be set to 0 to scroll only when the selection reaches the bottom of the window. + +That's the behavior when `gui.scrollOffBehavior` is set to "margin" (the default). If you set `gui.scrollOffBehavior` to "jump", then upon reaching the last line of a view and hitting down-arrow the view will scroll by half a page so that the selection ends up in the middle of the view. This may feel a little jarring because the cursor jumps around when continuously moving down, but it has the advantage that the view doesn't scroll as often. + +This setting applies both to all list views (e.g. commits and branches etc), and to the staging view. + +## Filtering + +We have two ways to filter things, substring matching (the default) and fuzzy searching. With substring matching, the text you enter gets searched for verbatim (usually case-insensitive, except when your filter string contains uppercase letters, in which case we search case-sensitively). You can search for multiple non-contiguous substrings by separating them with spaces; for example, "int test" will match "integration-testing". All substrings have to match, but not necessarily in the given order. + +Fuzzy searching is smarter in that it allows every letter of the filter string to match anywhere in the text (only in order though), assigning a weight to the quality of the match and sorting by that order. This has the advantage that it allows typing "clt" to match "commit_loader_test" (letters at the beginning of subwords get more weight); but it has the disadvantage that it tends to return lots of irrelevant results, especially with short filter strings. + +## Color Attributes + +For color attributes you can choose an array of attributes (with max one color attribute) +The available attributes are: + +**Colors** + +- black +- red +- green +- yellow +- blue +- magenta +- cyan +- white +- '#ff00ff' + +**Modifiers** + +- bold +- default +- reverse # useful for high-contrast +- underline +- strikethrough + +## Highlighting the selected line + +If you don't like the default behaviour of highlighting the selected line with a blue background, you can use the `selectedLineBgColor` key to customise the behaviour. If you just want to embolden the selected line (this was the original default), you can do the following: + +```yaml +gui: + theme: + selectedLineBgColor: + - default +``` + +You can also use the reverse attribute like so: + +```yaml +gui: + theme: + selectedLineBgColor: + - reverse +``` + +## Custom Author Color + +Lazygit will assign a random color for every commit author in the commits pane by default. + +You can customize the color in case you're not happy with the randomly assigned one: + +```yaml +gui: + authorColors: + 'John Smith': 'red' # use red for John Smith + 'Alan Smithee': '#00ff00' # use green for Alan Smithee +``` + +You can use wildcard to set a unified color in case your are lazy to customize the color for every author or you just want a single color for all/other authors: + +```yaml +gui: + authorColors: + # use red for John Smith + 'John Smith': 'red' + # use blue for other authors + '*': '#0000ff' +``` + +## Custom Branch Color + +You can customize the color of branches based on branch patterns (regular expressions): + +```yaml +gui: + 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 + +![border example](../../assets/colored-border-example.png) + +## Display Nerd Fonts Icons + +If you are using [Nerd Fonts](https://www.nerdfonts.com), you can display icons. + +```yaml +gui: + nerdFontsVersion: "3" +``` + +Supported versions are "2" and "3". The deprecated config `showIcons` sets the version to "2" for backwards compatibility. + +## Keybindings + +For all possible keybinding options, check [Custom_Keybindings.md](keybindings/Custom_Keybindings.md) + +You can disable certain key bindings by specifying ``. + +```yaml +keybinding: + universal: + edit: # disable 'edit file' +``` + +### Example Keybindings For Colemak Users + +```yaml +keybinding: + universal: + prevItem-alt: 'u' + nextItem-alt: 'e' + prevBlock-alt: 'n' + nextBlock-alt: 'i' + nextMatch: '=' + prevMatch: '-' + new: 'k' + edit: 'o' + openFile: 'O' + scrollUpMain-alt1: 'U' + scrollDownMain-alt1: 'E' + scrollUpMain-alt2: '' + scrollDownMain-alt2: '' + undo: 'l' + redo: '' + diffingMenu: 'M' + filteringMenu: '' + files: + ignoreFile: 'I' + commits: + moveDownCommit: '' + moveUpCommit: '' + branches: + viewGitFlowOptions: 'I' + setUpstream: 'U' +``` + +## Custom pull request URLs + +Some git provider setups (e.g. on-premises GitLab) can have distinct URLs for git-related calls and the web interface/API itself. To work with those, Lazygit needs to know where it needs to create the pull request. You can do so on your `config.yml` file using the following syntax: + +```yaml +services: + '': ':' +``` + +Where: + +- `gitDomain` stands for the domain used by git itself (i.e. the one present on clone URLs), e.g. `git.work.com` +- `provider` is one of `github`, `bitbucket`, `bitbucketServer`, `azuredevops`, `gitlab` or `gitea` +- `webDomain` is the URL where your git service exposes a web interface and APIs, e.g. `gitservice.work.com` + +## 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 hitting first match: + +- Branch name: feature/AB-123 +- 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: "^([^_]+)_.*" # 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 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] ' + 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. + +Example: + +Some branches: + +- jsmith/AB-123 +- cwilson/AB-125 + +```yaml +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: + +``` +git: + branchLogCmd: "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium --oneline {{branchName}} --" +``` + +Result: + +![](https://i.imgur.com/Nibq35B.png) + +## Launching not in a repository behaviour + +By default, when launching lazygit from a directory that is not a repository, you will be prompted to choose if you would like to initialize a repo. You can override this behaviour in the config with one of the following: + +```yaml +# for default prompting behaviour +notARepository: 'prompt' +``` + +```yaml +# to skip and initialize a new repo +notARepository: 'create' +``` + +```yaml +# to skip without creating a new repo +notARepository: 'skip' +``` + +```yaml +# to exit immediately if run outside of the Git repository +notARepository: 'quit' +``` diff --git a/docs-master/Custom_Command_Keybindings.md b/docs-master/Custom_Command_Keybindings.md new file mode 100644 index 00000000000..aef9c350052 --- /dev/null +++ b/docs-master/Custom_Command_Keybindings.md @@ -0,0 +1,370 @@ +# Custom Command Keybindings + +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: + - key: '' + context: 'commits' + command: 'hub browse -- "commit/{{.SelectedLocalCommit.Hash}}"' + - key: 'a' + context: 'files' + command: "git {{if .SelectedFile.HasUnstagedChanges}} add {{else}} reset {{end}} {{.SelectedFile.Name | quote}}" + description: 'Toggle file staged' + - key: 'C' + context: 'global' + command: "git commit" + output: terminal + - key: 'n' + context: 'localBranches' + prompts: + - type: 'menu' + title: 'What kind of branch is it?' + key: 'BranchType' + options: + - name: 'feature' + description: 'a feature branch' + value: 'feature' + - name: 'hotfix' + description: 'a hotfix branch' + value: 'hotfix' + - name: 'release' + description: 'a release branch' + value: 'release' + - type: 'input' + title: 'What is the new branch name?' + key: 'BranchName' + initialValue: '' + command: "git flow {{.Form.BranchType}} start {{.Form.BranchName}}" + loadingText: 'Creating branch' +``` + +Looking at the command assigned to the 'n' key, here's what the result looks like: + +![](../../assets/custom-command-keybindings.gif) + +Custom command keybindings will appear alongside inbuilt keybindings when you view the keybindings menu by pressing '?': + +![](https://i.imgur.com/QB21FPx.png) + +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). 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 | +| 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 | +| 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: +| _field_ | _description_ | required | +|-----------------|----------------------|-| +| checkForConflicts | true/false. If true, check for merge conflicts | no | + +## Contexts + +The permitted contexts are: + +| _context_ | _description_ | +| -------------- | -------------------------------------------------------------------------------------------------------- | +| status | The 'Status' tab | +| files | The 'Files' tab | +| worktrees | The 'Worktrees' tab | +| localBranches | The 'Local Branches' tab | +| remotes | The 'Remotes' tab | +| remoteBranches | The context you get when pressing enter on a remote in the remotes tab | +| tags | The 'Tags' tab | +| commits | The 'Commits' tab | +| reflogCommits | The 'Reflog' tab | +| subCommits | The context you see when pressing enter on a branch | +| commitFiles | The context you see when pressing enter on a commit or stash entry (warning, might be renamed in future) | +| stash | The 'Stash' tab | +| global | This keybinding will take affect everywhere | + +> **Bonus** +> +> You can use a comma-separated string, such as `context: 'commits, subCommits'`, to make it effective in multiple contexts. + + +## Prompts + +### Common fields + +These fields are applicable to all prompts. + +| _field_ | _description_ | _required_ | +| ------------ | -----------------------------------------------------------------------------------------------| ---------- | +| type | One of 'input', 'confirm', 'menu', 'menuFromCommand' | yes | +| title | The title to display in the popup panel | no | +| key | Used to reference the entered value from within the custom command. E.g. a prompt with `key: 'Branch'` can be referred to as `{{.Form.Branch}}` in the command | yes | + +### Input + +| _field_ | _description_ | _required_ | +| ------------ | -----------------------------------------------------------------------------------------------| ---------- | +| initialValue | The initial value to appear in the text box | no | +| suggestions | Shows suggestions as the input is entered. See below for details | no | + +The permitted suggestions fields are: +| _field_ | _description_ | _required_ | +|-----------------|----------------------|-| +| preset | Uses built-in logic to obtain the suggestions. One of 'authors', 'branches', 'files', 'refs', 'remotes', 'remoteBranches', 'tags' | no | +| command | Command to run such that each line in the output becomes a suggestion. Mutually exclusive with 'preset' field. | no | + +Here's an example of passing a preset: + +```yml +customCommands: + - key: 'a' + command: 'echo {{.Form.Branch | quote}}' + context: 'commits' + prompts: + - type: 'input' + title: 'Which branch?' + key: 'Branch' + suggestions: + preset: 'branches' # use built-in logic for obtaining branches +``` + +Here's an example of passing a command directly: + +```yml +customCommands: + - key: 'a' + command: 'echo {{.Form.Branch | quote}}' + context: 'commits' + prompts: + - type: 'input' + title: 'Which branch?' + key: 'Branch' + suggestions: + command: "git branch --format='%(refname:short)'" +``` + + +Here's an example of passing an initial value for the input: + +```yml +customCommands: + - key: 'a' + command: 'echo {{.Form.Remote | quote}}' + context: 'commits' + prompts: + - type: 'input' + title: 'Remote:' + key: 'Remote' + initialValue: "{{.SelectedRemote.Name}}" +``` + +### Confirm + +| _field_ | _description_ | _required_ | +| ------------ | -----------------------------------------------------------------------------------------------| ---------- | +| body | The immutable body text to appear in the text box | no | + +Example: + +```yml +customCommands: + - key: 'a' + command: 'echo "pushing to remote"' + context: 'commits' + prompts: + - type: 'confirm' + title: 'Push to remote' + body: 'Are you sure you want to push to the remote?' +``` + +### Menu + +| _field_ | _description_ | _required_ | +| ------------ | -----------------------------------------------------------------------------------------------| ---------- | +| options | The options to display in the menu | yes | + +The permitted option fields are: +| _field_ | _description_ | _required_ | +|-----------------|----------------------|-| +| name | The first part of the label | no | +| description | The second part of the label | no | +| value | the value that will be used in the command | yes | + +If an option has no name the value will be displayed to the user in place of the name, so you're allowed to only include the value like so: + +```yml +customCommands: + - key: 'a' + command: 'echo {{.Form.BranchType | quote}}' + context: 'commits' + prompts: + - type: 'menu' + title: 'What kind of branch is it?' + key: 'BranchType' + options: + - value: 'feature' + - value: 'hotfix' + - value: 'release' +``` + +Here's an example of supplying more detail for each option: + +```yml +customCommands: + - key: 'a' + command: 'echo {{.Form.BranchType | quote}}' + context: 'commits' + prompts: + - type: 'menu' + title: 'What kind of branch is it?' + key: 'BranchType' + options: + - value: 'feature' + name: 'feature branch' + description: 'branch based off develop' + - value: 'hotfix' + name: 'hotfix branch' + description: 'branch based off main for fast bug fixes' + - value: 'release' + name: 'release branch' + description: 'branch for a release' +``` + +### Menu-from-command + +| _field_ | _description_ | _required_ | +| ------------ | -----------------------------------------------------------------------------------------------| ---------- | +| command | The command to run to generate menu options | yes | +| filter | The regexp to run specifying groups which are going to be kept from the command's output | no | +| valueFormat | How to format matched groups from the filter to construct a menu item's value | no | +| labelFormat | Like valueFormat but for the labels. If `labelFormat` is not specified, `valueFormat` is shown instead. | no | + +Here's an example using named groups in the regex. Notice how we can pipe the label to a colour function for coloured output (available colours [here](https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md)) + +```yml + - key : 'a' + description: 'Checkout a remote branch as FETCH_HEAD' + command: "git fetch {{.Form.Remote}} {{.Form.Branch}} && git checkout FETCH_HEAD" + context: 'remotes' + prompts: + - type: 'menuFromCommand' + title: 'Remote branch:' + key: 'Branch' + command: 'git branch -r --list {{.SelectedRemote.Name }}/*' + filter: '.*{{.SelectedRemote.Name }}/(?P.*)' + valueFormat: '{{ .branch }}' + labelFormat: '{{ .branch | green }}' +``` + +Here's an example using unnamed groups: + +```yml + - key : 'a' + description: 'Checkout a remote branch as FETCH_HEAD' + command: "git fetch {{.Form.Remote}} {{.Form.Branch}} && git checkout FETCH_HEAD" + context: 'remotes' + prompts: + - type: 'menuFromCommand' + title: 'Remote branch:' + key: 'Branch' + command: 'git branch -r --list {{.SelectedRemote.Name }}/*' + filter: '.*{{.SelectedRemote.Name }}/(.*)' + valueFormat: '{{ .group_1 }}' + labelFormat: '{{ .group_1 | green }}' +``` + +Here's an example using a command but not specifying anything else: so each line from the command becomes the value and label of the menu items + +```yml + - key : 'a' + description: 'Checkout a remote branch as FETCH_HEAD' + command: "open {{.Form.File | quote}}" + context: 'global' + prompts: + - type: 'menuFromCommand' + title: 'File:' + key: 'File' + command: 'ls' +``` + +## Placeholder values + +Your commands can contain placeholder strings using Go's [template syntax](https://jan.newmarch.name/golang/template/chapter-template.html). The template syntax is pretty powerful, letting you do things like conditionals if you want, but for the most part you'll simply want to be accessing the fields on the following objects: + +``` +SelectedCommit +SelectedCommitRange +SelectedFile +SelectedPath +SelectedLocalBranch +SelectedRemoteBranch +SelectedRemote +SelectedTag +SelectedStashEntry +SelectedCommitFile +SelectedWorktree +CheckedOutBranch +``` + +(For legacy reasons, `SelectedLocalCommit`, `SelectedReflogCommit`, and `SelectedSubCommit` are also available, but they are deprecated.) + + +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 `output: popup` so that it doesn't actually execute the command but you can see how the placeholders were resolved. + +## More Examples + +See the [wiki](https://github.com/jesseduffield/lazygit/wiki/Custom-Commands-Compendium) page for more examples, and feel free to add your own custom commands to this page so others can benefit! diff --git a/docs-master/Custom_Pagers.md b/docs-master/Custom_Pagers.md new file mode 100644 index 00000000000..c6616cecf7e --- /dev/null +++ b/docs-master/Custom_Pagers.md @@ -0,0 +1,116 @@ +# Custom Pagers + +Lazygit supports custom pagers, [configured](/docs/Config.md) in the config.yml file (which can be opened by pressing `e` in the Status panel). + +Support does not extend to Windows users, because we're making use of a package which doesn't have Windows support. However, see [below](#emulating-custom-pagers-on-windows) for a workaround. + +Multiple pagers are supported; you can cycle through them with the `|` key. This can be useful if you usually prefer a particular pager, but want to use a different one for certain kinds of diffs. + +Pagers are configured with the `pagers` array in the git section; here's an example for a multi-pager setup: + +```yaml +git: + pagers: + - pager: delta --dark --paging=never + - pager: ydiff -p cat -s --wrap --width={{columnWidth}} + colorArg: never + - externalDiffCommand: difft --color=always +``` + +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`. The default is `always`, since that's what most pagers need. + +## Delta: + +```yaml +git: + pagers: + - pager: delta --dark --paging=never +``` + +![](https://i.imgur.com/QJpQkF3.png) + +A cool feature of delta is --hyperlinks, which renders clickable links for the line numbers in the left margin, and lazygit supports these. To use them, set the `pager:` config to `delta --dark --paging=never --line-numbers --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"`; this allows you to click on an underlined line number in the diff to jump right to that same line in your editor. + +## Diff-so-fancy + +```yaml +git: + pagers: + - pager: diff-so-fancy +``` + +![](https://i.imgur.com/rjH1TpT.png) + +## ydiff + +```yaml +gui: + sidePanelWidth: 0.2 # gives you more space to show things side-by-side +git: + pagers: + - colorArg: never + pager: ydiff -p cat -s --wrap --width={{columnWidth}} +``` + +![](https://i.imgur.com/vaa8z0H.png) + +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 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). + +These can be used in lazygit by using the `externalDiffCommand` config; in the case of difftastic, that could be + +```yaml +git: + pagers: + - externalDiffCommand: difft --color=always +``` + +The `colorArg` and `pager` options are not used in this case. + +You can add whatever extra arguments you prefer for your difftool; for instance + +```yaml +git: + pagers: + - 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: + pagers: + - 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. + +## Emulating custom pagers on Windows + +There is a trick to emulate custom pagers on Windows using a Powershell script configured as an external diff command. It's not perfect, but certainly better than nothing. To do this, save the following script as `lazygit-pager.ps1` at a convenient place on your disk: + +```pwsh +#!/usr/bin/env pwsh + +$old = $args[1].Replace('\', '/') +$new = $args[4].Replace('\', '/') +$path = $args[0] +git diff --no-index --no-ext-diff $old $new + | %{ $_.Replace($old, $path).Replace($new, $path) } + | delta --width=$env:LAZYGIT_COLUMNS +``` + +Use the pager of your choice with the arguments you like in the last line of the script. Personally I wouldn't want to use lazygit anymore without delta's `--hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"` args, see [above](#delta). + +In your lazygit config, use + +```yml +git: + pagers: + - externalDiffCommand: "C:/wherever/lazygit-pager.ps1" +``` + +The main limitation of this approach compared to a "real" pager is that renames are not displayed correctly; they are shown as if they were modifications of the old file. (This affects only the hunk headers; the diff itself is always correct.) diff --git a/docs-master/Fixup_Commits.md b/docs-master/Fixup_Commits.md new file mode 100644 index 00000000000..d08914f334a --- /dev/null +++ b/docs-master/Fixup_Commits.md @@ -0,0 +1,65 @@ +# Fixup Commits + +## Background + +There's this common scenario that you have a PR in review, the reviewer is +requesting some changes, and you make those changes and would normally simply +squash them into the original commit that they came from. If you do that, +however, there's no way for the reviewer to see what you changed. You could just +make a separate commit with those changes at the end of the branch, but this is +not ideal because it results in a git history that is not very clean. + +To help with this, git has a concept of fixup commits: you do make a separate +commit, but the subject of this commit is the string "fixup! " followed by the +original commit subject. This both tells the reviewer what's going on (you are +making a change that you later will squash into the designated commit), and it +provides an easy way to actually perform this squash operation when you are +ready to do that (before merging). + +## Creating fixup commits + +You could of course create fixup commits manually by typing in the commit +message with the prefix yourself. But lazygit has an easier way to do that: +in the Commits view, select the commit that you want to create a fixup for, and +press shift-F (for "Create fixup commit for this commit"). This automatically +creates a commit with the appropriate subject line. + +Don't confuse this with the lowercase "f" command ("Fixup commit"); that one +squashes the selected commit into its parent, this is not what we want here. + +## Creating amend commits + +There's a special type of fixup commit that uses "amend!" instead of "fixup!" in +the commit message subject; in addition to fixing up the original commit with +changes it allows you to also (or only) change the commit message of the +original commit. The menu that appears when pressing shift-F has options for +both of these; they bring up a commit message panel similar to when you reword a +commit, but then create the "amend!" commit containing the new message. Note +that in that panel you only type the new message as you want it to be +eventually; lazygit then takes care of formatting the "amend!" commit +appropriately for you (with the subject of your new message moving into the body +of the "amend!" commit). + +## Squashing fixup commits + +When you're ready to merge the branch and want to squash all these fixup commits +that you created, that's very easy to do: select the first commit of your branch +and hit shift-S (for "Squash all 'fixup!' commits above selected commit +(autosquash)"). Boom, done. + +## Finding the commit to create a fixup for + +When you are making changes to code that you changed earlier in a long branch, +it can be tedious to find the commit to squash it into. Lazygit has a command to +help you with this, too: in the Files view, press ctrl-f to select the right +base commit in the Commits view automatically. From there, you can either press +shift-F to create a fixup commit for it, or shift-A to amend your changes into +the commit if you haven't published your branch yet. + +If you have many modifications in your working copy, it is a good idea to stage +related changes that are meant to go into the same fixup commit; if no changes +are staged, ctrl-f works on all unstaged modifications, and then it might show +an error if it finds multiple different base commits. If you are interested in +what the command does to do its magic, and how you can help it work better, you +may want to read the [design document](dev/Find_Base_Commit_For_Fixup_Design.md) +that describes this. diff --git a/docs-master/README.md b/docs-master/README.md new file mode 100644 index 00000000000..1bc0bb6be2e --- /dev/null +++ b/docs-master/README.md @@ -0,0 +1,11 @@ +# Documentation Overview + +* [Configuration](./Config.md). +* [Custom Commands](./Custom_Command_Keybindings.md) +* [Custom Pagers](./Custom_Pagers.md) +* [Dev docs](./dev) +* [Keybindings](./keybindings) +* [Undo/Redo](./Undoing.md) +* [Range Select](./Range_Select.md) +* [Searching/Filtering](./Searching.md) +* [Stacked Branches](./Stacked_Branches.md) diff --git a/docs-master/Range_Select.md b/docs-master/Range_Select.md new file mode 100644 index 00000000000..e46c2689725 --- /dev/null +++ b/docs-master/Range_Select.md @@ -0,0 +1,14 @@ +# Range Select + +Some actions can be performed on a range of contiguous items. For example: +* staging multiple files at once +* squashing multiple commits at once +* copying (for cherry-pick) multiple commits at once + +There are two ways to select a range of items: +1. Sticky range select: Press 'v' to toggle range select, then expand the selection using the up/down arrow key. To reset the selection, press 'v' again. +2. Non-sticky range select: Press shift+up or shift+down to expand the selection. To reset the selection, press up/down without shift. + +The sticky option will be more familiar to vim users, and the second option will feel more natural to users who aren't used to doing things in a modal way. + +In order to perform an action on a range of items, simply press the normal key for that action. If the action only works on individual items, it will raise an error. This is a new feature and the plan is to incrementally support range select for more and more actions. If there is an action you would like to support range select which currently does not, please raise an issue in the repo. diff --git a/docs-master/Searching.md b/docs-master/Searching.md new file mode 100644 index 00000000000..589831c55e3 --- /dev/null +++ b/docs-master/Searching.md @@ -0,0 +1,21 @@ +# Searching/Filtering + +## View searching/filtering + +Depending on the currently focused view, hitting '/' will bring up a filter or search prompt. When filtering, the contents of the view will be filtered down to only those lines which match the query string. When searching, the contents of the view are not filtered, but matching lines are highlighted and you can iterate through matches with `n`/`N`. + +We intend to support filtering for the files view soon, but at the moment it uses searching. We intend to continue using search for the commits view because you typically care about the commits that come before/after a matching commit. + +If you would like both filtering and searching to be enabled on a given view, please raise an issue for this. + +## Filtering files by status + +You can filter the files view to only show staged/unstaged files by pressing `` in the files view. + +## Filtering commits by file path + +You can filter the commits view to only show commits which contain changes to a given file path. + +You can do this in a couple of ways: +1) Start lazygit with the -f flag e.g. `lazygit -f my/path` +2) From within lazygit, press `` and then enter the path of the file you want to filter by diff --git a/docs-master/Stacked_Branches.md b/docs-master/Stacked_Branches.md new file mode 100644 index 00000000000..cd573be2623 --- /dev/null +++ b/docs-master/Stacked_Branches.md @@ -0,0 +1,18 @@ +# Working with stacked branches + +When working on a large branch it can often be useful to break it down into +smaller pieces, and it can help to create separate branches for each independent +chunk of changes. For example, you could have one branch for preparatory +refactorings, one for backend changes, and one for frontend changes. Those +branches would then all be stacked onto each other. + +Git has support for rebasing such a stack as a whole; you can enable it by +setting the git config `rebase.updateRefs` to true. If you then rebase the +topmost branch of the stack, the other ones in the stack will follow. This +includes interactive rebases, so for example amending a commit in the first +branch of the stack will "just work" in the sense that it keeps the other +branches properly stacked onto it. + +Lazygit visualizes the individual branch heads in the stack by marking them with a +cyan asterisk (or a cyan branch symbol if you are using [nerd +fonts](Config.md#display-nerd-fonts-icons)). diff --git a/docs-master/Undoing.md b/docs-master/Undoing.md new file mode 100644 index 00000000000..0a4c2f381a2 --- /dev/null +++ b/docs-master/Undoing.md @@ -0,0 +1,24 @@ +# Undo/Redo in lazygit + +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. + +![undo](../../assets/demo/undo-compressed.gif) + +## How it works + +If you're as clumsy as me you'll probably have felt the pain of botching an interactive rebase or doing a hard reset onto the wrong commit. Luckily, the reflog allows you to trace your steps and make things right again, but I personally can't stand trying to make sense of the reflog. + +Lazygit can read through your reflog for you and walk back action by action so that you don't even need to read the reflog. If lazygit finds a reflog entry where you checked out a branch, we'll checkout the original branch. If the entry is from a commit being applied, we'll go back to the commit before that. If we hit an interactive rebase, we'll go back to the commit you were on just before you started it. + +## You can even undo things you did outside of lazygit! + +Because lazygit just uses the reflog to keep track of things, it doesn't matter whether you're trying to undo something you did in lazygit or directly on the command line. You can open lazygit for the first time and start undoing thing in your repo! Likewise, lazygit marks its undos/redos in the reflog so if you quit the application and come back, lazygit still knows where you're up to. + +## Limitations + +There are limitations: firstly, lazygit can only undo things that are recorded in the reflog. That means changes to your working tree or stash aren't covered. Secondly, anything permanent you do like pushing to a remote can't be undone. Thirdly, actions like creating a branch won't be undone, because they're not stored in the reflog. + +If you are mid-rebase, undo/redo is not supported, because the reflog doesn't contain enough information about what specific things have happened inside that rebase. If you want to undo out of a rebase, it's best to abort the rebase (the default keybinding for bringing up rebase options is 'm'). + +Undo/Redo is a new feature so if you find a bug let us know. The worst case scenario is that you'll just need to look at your reflog and manually put yourself back on track. diff --git a/docs-master/dev/Busy.md b/docs-master/dev/Busy.md new file mode 100644 index 00000000000..6aa3b7bb59b --- /dev/null +++ b/docs-master/dev/Busy.md @@ -0,0 +1,78 @@ +# Knowing when Lazygit is busy/idle + +## The use-case + +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 +4) repeat + +In the past the process was: +1) press a key +2) run assertion +3) if assertion fails, wait a bit and retry +4) repeat + +The old process was problematic because an assertion may give a false positive due to the contents of some view not yet having changed since the last key was pressed. + +## The solution + +First, it's important to distinguish three different types of goroutines: +* The UI goroutine, of which there is only one, which infinitely processes a queue of events +* Worker goroutines, which do some work and then typically enqueue an event in the UI goroutine to display the results +* Background goroutines, which periodically spawn worker goroutines (e.g. doing a git fetch every minute) + +The point of distinguishing worker goroutines from background goroutines is that when any worker goroutine is running, we consider Lazygit to be 'busy', whereas this is not the case with background goroutines. It would be pointless to have background goroutines be considered 'busy' because then Lazygit would be considered busy for the entire duration of the program! + +In gocui, the underlying package we use for managing the UI and events, we keep track of how many busy goroutines there are using the `Task` type. A task represents some work being done by lazygit. The gocui Gui struct holds a map of tasks and allows creating a new task (which adds it to the map), pausing/continuing a task, and marking a task as done (which removes it from the map). Lazygit is considered to be busy so long as there is at least one busy task in the map; otherwise it's considered idle. When Lazygit goes from busy to idle, it notifies the integration test. + +It's important that we play by the rules below to ensure that after the user does anything, all the processing that follows happens in a contiguous block of busy-ness with no gaps. + +### Spawning a worker goroutine + +Here's the basic implementation of `OnWorker` (using the same flow as `WaitGroup`s): + +```go +func (g *Gui) OnWorker(f func(*Task)) { + task := g.NewTask() + go func() { + f(task) + task.Done() + }() +} +``` + +The crucial thing here is that we create the task _before_ spawning the goroutine, because it means that we'll have at least one busy task in the map until the completion of the goroutine. If we created the task within the goroutine, the current function could exit and Lazygit would be considered idle before the goroutine starts, leading to our integration test prematurely progressing. + +You typically invoke this with `self.c.OnWorker(f)`. Note that the callback function receives the task. This allows the callback to pause/continue the task (see below). + +### Spawning a background goroutine + +Spawning a background goroutine is as simple as: + +```go +go utils.Safe(f) +``` + +Where `utils.Safe` is a helper function that ensures we clean up the gui if the goroutine panics. + +### Programmatically enqueueing a UI event + +This is invoked with `self.c.OnUIThread(f)`. Internally, it creates a task before enqueuing the function as an event (including the task in the event struct) and once that event is processed by the event queue (and any other pending events are processed) the task is removed from the map by calling `task.Done()`. + +### Pressing a key + +If the user presses a key, an event will be enqueued automatically and a task will be created before (and `Done`'d after) the event is processed. + +## Special cases + +There are a couple of special cases where we manually pause/continue the task directly in the client code. These are subject to change but for the sake of completeness: + +### Writing to the main view(s) + +If the user focuses a file in the files panel, we run a `git diff` command for that file and write the output to the main view. But we only read enough of the command's output to fill the view's viewport: further loading only happens if the user scrolls. Given that we have a background goroutine for running the command and writing more output upon scrolling, we create our own task and call `Done` on it as soon as the viewport is filled. + +### Requesting credentials from a git command + +Some git commands (e.g. git push) may request credentials. This is the same deal as above; we use a worker goroutine and manually pause continue its task as we go from waiting on the git command to waiting on user input. This requires passing the task through to the `Push` method so that it can be paused/continued. diff --git a/docs-master/dev/Codebase_Guide.md b/docs-master/dev/Codebase_Guide.md new file mode 100644 index 00000000000..1692be33ea6 --- /dev/null +++ b/docs-master/dev/Codebase_Guide.md @@ -0,0 +1,100 @@ +# Lazygit Codebase Guide + +## Packages + +* `pkg/app`: Contains startup code, initialises a bunch of stuff like logging, the user config, etc, before starting the gui. Catches and handles some errors that the gui raises. +* `pkg/app/daemon`: Contains code relating to the lazygit daemon. This could be better named: it's is not a daemon in the sense that it's a long-running background process; rather it's a short-lived background process that we pass to git for certain tasks, like GIT_EDITOR for when we want to set the TODO file for an interactive rebase. +* `pkg/cheatsheet`: Generates the keybinding cheatsheets in `docs/keybindings`. +* `pkg/commands/git_commands`: All communication to the git binary happens here. So for example there's a `Checkout` method which calls `git checkout`. +* `pkg/commands/oscommands`: Contains code for talking to the OS, and for invoking commands in general +* `pkg/commands/git_config`: Reading of the git config all happens here. +* `pkg/commands/hosting_service`: Contains code that is specific to git hosting services (aka forges). +* `pkg/commands/models`: Contains model structs that represent commits, branches, files, etc. +* `pkg/commands/patch`: Contains code for parsing and working with git patches +* `pkg/common`: Contains the `Common` struct which holds common dependencies like the logger, i18n, and the user config. Most structs in the code will have a field named `c` which holds a common struct (or a derivative of the common struct). +* `pkg/config`: Contains code relating to the Lazygit user config. Specifically `pkg/config/user_config/go` defines the user config struct and its default values. See [below](#using-userconfig) for some important information about using it. +* `pkg/constants`: Contains some constant strings (e.g. links to docs) +* `pkg/env`: Contains code relating to setting/getting environment variables +* `pkg/i18n`: Contains internationalised strings +* `pkg/integration`: Contains end-to-end tests +* `pkg/jsonschema`: Contains generator for user config JSON schema. +* `pkg/logs`: Contains code for instantiating the logger and for tailing the logs via `lazygit --logs` +* `pkg/tasks`: Contains code for running asynchronous tasks: mostly related to efficiently rendering command output to the main window. +* `pkg/theme`: Contains code related to colour themes. +* `pkg/updates`: Contains code related to Lazygit updates (checking for update, download and installing the update) +* `pkg/utils`: Contains lots of low-level helper functions +* `pkg/gui`: Contains code related to the gui. We've still got a God Struct in the form of our Gui struct, but over time code has been moved out into contexts, controllers, and helpers, and we intend to continue moving more code out over time. +* `pkg/gui/context`: Contains code relating to contexts. There is a context for each view e.g. a branches context, a tags context, etc. Contexts manage state related to the view and receive keypresses. +* `pkg/gui/controllers`: Contains code relating to controllers. Controllers define a list of keybindings and their associated handlers. One controller can be assigned to multiple contexts, and one context can contain multiple controllers. +* `pkg/gui/controllers/helpers`: Contains code that is shared between multiple controllers. +* `pkg/gui/filetree`: Contains code relating to the representation of filetrees. +* `pkg/gui/keybindings`: Contains code for mapping between keybindings and their labels +* `pkg/gui/mergeconflicts`: Contains code relating to the handling of merge conflicts +* `pkg/gui/modes`: Contains code relating to the state of different modes e.g. cherry picking mode, rebase mode. +* `pkg/gui/patch_exploring`: Contains code relating to the state of patch-oriented views like the staging view. +* `pkg/gui/popup`: Contains code that lets you easily raise popups +* `pkg/gui/presentation`: Contains presentation code i.e. code concerned with rendering content inside views +* `pkg/gui/services/custom_commands`: Contains code related to user-defined custom commands. +* `pkg/gui/status`: Contains code for invoking loaders and toasts +* `pkg/gui/style`: Contains code for specifying text styles (colour, bold, etc) +* `pkg/gui/types`: Contains various gui-specific types and interfaces. Lots of code lives here to avoid circular dependencies +* `vendor/github.com/jesseduffield/gocui`: Gocui is the underlying library used for handling the gui event loop, handling keypresses, and rendering the UI. It defines the View struct which our own context structs build upon. + +## Important files + +* `pkg/config/user_config.go`: defines the user config and default values +* `pkg/gui/keybindings.go`: defines keybindings which have not yet been moved into a controller (originally all keybindings were defined here) +* `pkg/gui/controllers.go`: links up controllers with contexts +* `pkg/gui/controllers/helpers/helpers.go`: defines all the different helper structs +* `pkg/commands/git.go`: defines all the different git command structs +* `pkg/gui/gui.go`: defines the top-level gui state and gui initialisation/run code +* `pkg/gui/layout.go`: defines what happens on each render +* `pkg/gui/controllers/helpers/window_arrangement_helper.go`: defines the layout of the UI and the size/position of each window +* `pkg/gui/context/context.go`: defines the different contexts +* `pkg/gui/context/setup.go`: defines initialisation code for all contexts +* `pkg/gui/context.go`: manages the lifecycle of contexts, the context stack, and focus changes. +* `pkg/gui/types/views.go`: defines views +* `pkg/gui/views.go`: defines the ordering of views (front to back) and their initialisation code +* `pkg/gui/gui_common.go`: defines gui-specific methods that all controllers and helpers have access to +* `pkg/i18n/english.go`: defines the set of i18n strings and their English values +* `pkg/gui/controllers/helpers/refresh_helper.go`: manages refreshing of models. The refresh helper is typically invoked at the end of an action to re-load affected models from git (e.g. re-load branches after doing a git pull) +* `pkg/gui/controllers/quit_actions.go`: contains code that runs when you hit 'escape' on a view (assuming the view doesn't define its own escape handler) +* `vendor/github.com/jesseduffield/gocui/gui.go`: defines the gocui gui struct +* `vendor/github.com/jesseduffield/gocui/view.go`: defines the gocui view struct + +## Concepts + +* **View**: Views are defined in the gocui package, and they maintain an internal buffer of content which is rendered each time the screen is drawn. +* **Context**: A context is tied to a view and contains some additional state and logic specific to that view e.g. the branches context has code relating specifically to branches, and writes the list of branches to the branches view. Views and contexts share some responsibilities for historical reasons. +* **Controller**: A controller defined keybindings with associated handlers. One controller can be assigned to multiple contexts and one context can have multiple controllers. For example the list controller handles keybindings relating to navigating a list, and is assigned to all list contexts (e.g. the branches context). +* **Helper**: A helper defines shared code used by controllers, or used by some other parts of the application. Often a controller will have a method that ends up needing to be used by another controller, so in that case we move the method out into a helper so that both controllers can use it. We need to do this because controllers cannot refer to other controllers' methods. + +In terms of dependencies, controllers sit at the highest level, so they can refer to helpers, contexts, and views (although it's preferable for view-specific code to live in contexts). Helpers can refer to contexts and views, and contexts can only refer to views. Views can't refer to contexts, controllers, or helpers. + +* **Window**: A window is a section of the screen which will render a view. Windows are named after the default view that appears there, so for example there is a 'stash' window that is so named because by default the stash view appears there. But if you press enter on a stash entry, the stash entry's files will be shown in a different view, but in the same window. +* **Panel**: The term 'panel' is still used in a few places to refer to either a view or a window, and it's a term that is now deprecated in favour of 'view' and 'window'. +* **Tab**: Each tab in a window (e.g. Files, Worktrees, Submodules) actually has a corresponding view which we bring to the front upon changing tabs. +* **Model**: Representation of a git object e.g. commits, branches, files. +* **ViewModel**: Used by a context to maintain state related to the view. +* **Keybinding**: A keybinding associates a _key_ with an _action_. For example if you press the 'down' arrow, the action performed will be your cursor moving down a list by one. +* **Action**: An action is the thing that happens when you press a key. Often an action will invoke a git command, but not always: for example, navigation actions don't involve git. +* **Common structs**: Most structs have a field named `c` which contains a 'common' struct: a struct containing a bag of dependencies that most structs of the same layer require. For example if you want to access a helper from a controller you can do so with `self.c.Helpers.MyHelper`. + +## Event loop and threads + +The event loop is managed in the `MainLoop` function of `vendor/github.com/jesseduffield/gocui/gui.go`. Any time there is an event like a key press or a window resize, the event will be processed and then the screen will be redrawn. This involves calling the `layout` function defined in `pkg/gui/layout.go`, which lays out the windows and invokes some on-render hooks. + +Often, as part of handling a keypress, we'll want to run some code asynchronously so that it doesn't block the UI thread. For this we'll typically run `self.c.OnWorker(myFunc)`. If the worker wants to then do something on the UI thread again it can call `self.c.OnUIThread(myOtherFunc)`. + +## Using UserConfig + +The UserConfig struct is loaded from lazygit's global config file (and possibly repo-specific config files). It can be re-loaded while lazygit is running, e.g. when the user edits one of the config files. In this case we should make sure that any new or changed config values take effect immediately. The easiest way to achieve this is what we do in most controllers or helpers: these have a pointer to the `common.Common` struct, which contains the UserConfig, and access it from there. Since the UserConfig instance in `common.Common` is updated whenever we reload the config, the code can be sure that it always uses an up-to-date value, and there's nothing else to do. + +If that's not possible for some reason, see if you can add code to `Gui.onUserConfigLoaded` to update things from the new config; there are some examples in that function to use as a guide. If that's too hard to do too, add the config to the list in `Gui.checkForChangedConfigsThatDontAutoReload` so that the user is asked to quit and restart lazygit. + +## Legacy code structure + +Before we had controllers and contexts, all the code lived directly in the gui package under a gui God Struct. This was fairly bloated and so we split things out to have a better separation of concerns. Nonetheless, it's a big effort to migrate all the code so we still have some logic in the gui struct that ought to live somewhere else. Likewise, we have some keybindings defined in `pkg/gui/keybindings.go` that ought to live on a controller (all keybindings used to be defined in that one file). + +The new structure has its own problems: we don't have a clear guide on whether code should live in a controller or helper. The current approach is to put code in a controller until it's needed by another controller, and to then extract it out into a helper. We may be better off just putting code in helpers to start with and leaving controllers super-thin, with the responsibility of just pairing keys with corresponding helper functions. But it's not clear to me if that would be better than the current approach. + diff --git a/docs-master/dev/Demo_Recordings.md b/docs-master/dev/Demo_Recordings.md new file mode 100644 index 00000000000..1068e688f47 --- /dev/null +++ b/docs-master/dev/Demo_Recordings.md @@ -0,0 +1,82 @@ +# Demo Recordings + +We want our demo recordings to be consistent and easy to update if we make changes to Lazygit's UI. Luckily for us, we have an existing recording system for the sake of our integration tests, so we can piggyback on that. + +You'll want to familiarise yourself with how integration tests are written: see [here](../../pkg/integration/README.md). + +## Prerequisites + +Ideally we'd run this whole thing through docker but we haven't got that working. So you will need: +``` +# for recording +npm i -g terminalizer +# for gif compression +npm i -g gifsicle +# for mp4 conversion +brew install ffmpeg + +# font with icons +wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/DejaVuSansMono.tar.xz && \ + tar -xf DejaVuSansMono.tar.xz -C /usr/local/share/fonts && \ + rm DejaVuSansMono.tar.xz +``` + +## Creating a demo + +Demos are found in `pkg/integration/tests/demo/`. They are like regular integration tests but have `IsDemo: true` which has a few effects: +* The bottom row of the UI is quieter so that we can render captions +* Fetch/Push/Pull have artificial latency to mimic a network request +* The loader at the bottom-right does not appear + +In demos, we don't need to be as strict in our assertions as we are in tests. But it's still good to have some basic assertions so that if we automate the process of updating demos we'll know if one of them has broken. + +You can use the same flow as we use with integration tests when you're writing a demo: +* Setup the repo +* Run the demo in sandbox mode to get a feel of what needs to happen +* Come back and write the code to make it happen + +### Adding captions + +It's good to add captions explaining what task if being performed. Use the existing demos as a guide. + +### Setting up the assets worktree + +We store assets (which includes demo recordings) in the `assets` branch, which is a branch that shares no history with the main branch and exists purely for storing assets. Storing them separately means we don't clog up the code branches with large binaries. + +The scripts and demo definitions live in the code branches but the output lives in the assets branch so to be able to create a video from a demo you'll need to create a linked worktree for the assets branch which you can do with: + +```sh +git worktree add .worktrees/assets assets +``` + +Outputs will be stored in `.worktrees/assets/demos/`. We'll store three separate things: +* the yaml of the recording +* the original gif +* either the compressed gif or the mp4 depending on the output you chose (see below) + +### Recording the demo + +Once you're happy with your demo you can record it using: +```sh +scripts/record_demo.sh [gif|mp4] +# e.g. +scripts/record_demo.sh gif pkg/integration/tests/demo/interactive_rebase.go +``` + +~~The gif format is for use in the first video of the readme (it has a larger size but has auto-play and looping)~~ +~~The mp4 format is for everything else (no looping, requires clicking, but smaller size).~~ + +Turns out that you can't store mp4s in a repo and link them from a README so we're gonna just use gifs across the board for now. + +### Including demos in README/docs + +If you've followed the above steps you'll end up with your output in your assets worktree. + +Within that worktree, stage all three output files and raise a PR against the assets branch. + +Then back in the code branch, in the doc, you can embed the recording like so: +```md +![Nuke working tree](../assets/demo/interactive_rebase-compressed.gif) +``` + +This means we can update assets without needing to update the docs that embed them. diff --git a/docs-master/dev/Find_Base_Commit_For_Fixup_Design.md b/docs-master/dev/Find_Base_Commit_For_Fixup_Design.md new file mode 100644 index 00000000000..cf28bdae288 --- /dev/null +++ b/docs-master/dev/Find_Base_Commit_For_Fixup_Design.md @@ -0,0 +1,229 @@ +# About the mechanics of lazygit's "Find base commit for fixup" command + +## Background + +Lazygit has a command called "Find base commit for fixup" that helps with +creating fixup commits. (It is bound to "ctrl-f" by default, and I'll call it +simply "the ctrl-f command" throughout the rest of this text for brevity.) + +It's a heuristic that needs to make a few assumptions; it tends to work well in +practice if users are aware of its limitations. The user-facing side of the +topic is explained [here](../Fixup_Commits.md). In this document we describe how +it works internally, and the design decisions behind it. + +It is also interesting to compare it to the standalone tool +[git-absorb](https://github.com/tummychow/git-absorb) which does a very similar +thing, but made different decisions in some cases. We'll explore these +differences in this document. + +## Design goals + +I'll start with git-absorb's design goals (my interpretation, since I can't +speak for git-absorb's maintainer of course): its main goal seems to be minimum +user interaction required. The idea is that you have a PR in review, the +reviewer requested a bunch of changes, you make all these changes, so you have a +working copy with lots of modified files, and then you fire up git-absorb and it +creates all the necessary fixup commits automatically with no further user +intervention. + +While this sounds attractive, it conflicts with ctrl-f's main design goal, which +is to support creating high-quality fixups. My philosophy is that fixup commits +should have the same high quality standards as normal commits; in particular: + +- they should be atomic. This means that multiple diff hunks that belong + together to form one logical change should be in the same fixup commit. (Not + always possible if the logical change needs to be fixed up into several + different base commits.) +- they should be minimal. Every fixup commit should ideally contain only one + logical change, not several unrelated ones. + +Why is this important? Because fixup commits are mainly a tool for reviewing (if +they weren't, you might as well squash the changes into their base commits right +away). And reviewing fixup commits is easier if they are well-structured, just +like normal commits. + +The only way to achieve this with git-absorb is to set the `oneFixupPerCommit` +config option (for the first goal), and then manually stage the changes that +belong together (for the second). This is close to what you have to do with +ctrl-f, with one exception that we'll get to below. + +But ctrl-f enforces this by refusing to do the job if the staged hunks belong to +more than one base commit. Git-absorb will happily create multiple fixup commits +in this case; ctrl-f doesn't, to enforce that you pay attention to how you group +the changes. There's another reason for this behavior: ctrl-f doesn't create +fixup commits itself (unlike git-absorb), instead it just selects the found base +commit so that the user can decide whether to amend the changes right in, or +create a fixup commit from there (both are single-key commands in lazygit). And +lazygit doesn't support non-contiguous multiselections of commits, but even if +it did, it wouldn't help much in this case. + +## The mechanics + +### General approach + +Git-absorb uses a relatively simple approach, and the benefit is of course that +it is easy to understand: it looks at every diff hunk separately, and for every +hunk it looks at all commits (starting from the newest one backwards) to find +the earliest commit that the change can be amended to without conflicts. + +It is important to realize that "diff hunk" doesn't necessarily mean what you +see in the diff view. Git-absorb and ctrl-f both use a context of 0 when diffing +your code, so they often see more and smaller hunks than users do. For example, +moving a line of code down by one line is a single hunk for users, but it's two +separate hunks for git-absorb and ctrl-f; one for deleting the line at the old +place, and another one for adding the line at the new place, even if it's only +one line further down. + +From this, it follows that there's one big problem with git-absorb's approach: +when moving code, it doesn't realize that the two related hunks of deleting the +code from the old place and inserting it at the new place belong together, and +often it will manage to create a fixup commit for the first hunk, but leave the +other hunk in your working copy as "don't know what to do with this". As an +example, suppose your PR is adding a line of code to an existing function, maybe +one that declares a new variable, and a reviewer suggests to move this line down +a bit, closer to where some other related variables are declared. Moving the +line down results in two diff hunks (from the perspective of git-absorb and +ctrl-f, as they both use a context of 0 when diffing), and when looking at the +second diff hunk in isolation there's no way to find a base commit in your PR +for it, because the surrounding code is already on main. + +To solve this, the ctrl-f command makes a distinction between hunks that have +deleted lines and hunks that have only added lines. If the whole diff contains +any hunks that have deleted lines, it uses only those hunks to determine the +base commit, and then assumes that all the hunks that have only added lines +belong into the same commit. This nicely solves the above example of moving +code, but also other examples such as the following: + +
+Click to show example + +Suppose you have a PR in which you added the following function: + +```go +func findCommit(hash string) (*models.Commit, int, bool) { + for i, commit := range self.c.Model().Commits { + if commit.Hash == hash { + return commit, i, true + } + } + + return nil, -1, false +} +``` + +A reviewer suggests to replace the manual `for` loop with a call to +`lo.FindIndexOf` since that's less code and more idiomatic. So your modification +is this: + +```diff +--- a/my_file.go ++++ b/my_file.go +@@ -12,2 +12,3 @@ import ( + "github.com/jesseduffield/lazygit/pkg/utils" ++ "github.com/samber/lo" + "golang.org/x/sync/errgroup" +@@ -308,9 +309,5 @@ func (self *FixupHelper) blameAddedLines(addedLineHunks []*hunk) ([]string, error + func findCommit(hash string) (*models.Commit, int, bool) { +- for i, commit := range self.c.Model().Commits { +- if commit.Hash == hash { +- return commit, i, true +- } +- } +- +- return nil, -1, false ++ return lo.FindIndexOf(self.c.Model().Commits, func(commit *models.Commit) bool { ++ return commit.Hash == hash ++ }) + } +``` + +If we were to look at these two hunks separately, we'd easily find the base +commit for the second one, but we wouldn't find the one for the first hunk +because the imports around the added import have been on main for a long time. +In fact, git-absorb leaves this hunk in the working copy because it doesn't know +what to do with it. + +
+ +Only if there are no hunks with deleted lines does ctrl-f look at the hunks with +only added lines and determines the base commit for them. This solves cases like +adding a comment above a function that you added in your PR. + +The downside of this more complicated approach is that it relies on the user +staging related hunks correctly. However, in my experience this is easy to do +and not very error-prone, as long as users are aware of this behavior. Lazygit +tries to help making them aware of it by showing a warning whenever there are +hunks with only added lines in addition to hunks with deleted lines. + +### Finding the base commit for a given hunk + +As explained above, git-absorb finds the base commit by walking the commits +backwards until it finds one that conflicts with the hunk, and then the found +base commit is the one just before that one. This works reliably, but it is +slow. + +Ctrl-f uses a different approach that is usually much faster, but should always +yield the same result. Again, it makes a distinction between hunks with deleted +lines and hunks with only added lines. For hunks with deleted lines it performs +a line range blame for all the deleted lines (e.g. `git blame -L42,+3 -- +filename`), and if the result is the same for all deleted lines, then that's the +base commit; otherwise it returns an error. + +For hunks with only added lines, it gets a little more complicated. We blame the +single lines just before and just after the hunk (I'll ignore the edge cases of +either of those not existing because the hunk is at the beginning or end of the +file; read the code to see how we handle these cases). If the blame result is +the same for both, then that's the base commit. This is the case of adding a +line in the middle of a block of code that was added in the PR. Otherwise, the +base commit is the more recent of the two (and in this case it doesn't matter if +the other one is an earlier commit in the current branch, or a possibly very old +commit that's already on main). This covers the common case of adding a comment +to a function that was added in the PR, but also adding another line at the end +of a block of code that was added in the base commit. + +It's interesting to discuss what "more recent" means here. You could say if +commit A is an ancestor of commit B (or in other words, A is reachable from B) +then B is the more recent one. And if none of the two commits is reachable from +the other, you have an error case because it's unclear which of the two should +be considered the base commit. The scenario in which this happens is a commit +history like this: + +``` + C---D + / \ +A---B---E---F---G +``` + +where, for instance, D and E are the two blame results. + +Unfortunately, determining the ancestry relationship between two commits using +git commands is a bit expensive and not totally straightforward. Fortunately, +it's not necessary in lazygit because lazygit has the most recent 300 commits +cached in memory, and can simply search its linear list of commits to see which +one is closer to the beginning of the list. If only one of the two commits is +found within those 300 commits, then that's the more recent one; if neither is +found, we assume that both commits are on main and error out. In the merge +scenario pictured above, we arbitrarily return one of the two commits (this will +depend on the log order), but that's probably fine as this scenario should be +extremely rare in practice; in most cases, feature branches are simply linear. + +### Knowing where to stop searching + +Git-absorb needs to know when to stop walking backwards searching for commits, +since it doesn't make sense to create fixups for commits that are already on +main. However, it doesn't know where the current branch ends and main starts, so +it needs to rely on user input for this. By default it searches the most recent +10 commits, but this can be overridden with a config setting. In longer branches +this is often not enough for finding the base commit; but setting it to a higher +value causes the command to take longer to complete when the base commit can't +be found. + +Lazygit doesn't have this problem. For a given blame result it needs to +determine whether that commit is already on main, and if it can find the commit +in its cached list of the first 300 commits it can get that information from +there, because lazygit knows what the user's configured main branches are +(`master` and `main` by default, but it could also include branches like `devel` +or `1.0-hotfixes`), and so it can tell for each commit whether it's contained in +one of those main branches. And if it can't find it among the first 300 commits, +it assumes the commit already on main, on the assumption that no feature branch +has more than 300 commits. diff --git a/docs-master/dev/Integration_Tests.md b/docs-master/dev/Integration_Tests.md new file mode 100644 index 00000000000..df10c3f8fba --- /dev/null +++ b/docs-master/dev/Integration_Tests.md @@ -0,0 +1 @@ +see new docs [here](../../pkg/integration/README.md) diff --git a/docs-master/dev/Profiling.md b/docs-master/dev/Profiling.md new file mode 100644 index 00000000000..bfdffe4f909 --- /dev/null +++ b/docs-master/dev/Profiling.md @@ -0,0 +1,69 @@ +# Profiling Lazygit + +If you want to investigate what's contributing to CPU or memory usage, start +lazygit with the `-profile` command line flag. This tells it to start an +integrated web server that listens for profiling requests. + +## Save profile data + +### CPU + +While lazygit is running with the `-profile` flag, perform a CPU profile and +save it to a file by running this command in another terminal window: + +```sh +curl -o cpu.out http://127.0.0.1:6060/debug/pprof/profile +``` + +By default, it profiles for 30 seconds. To change the duration, use + +```sh +curl -o cpu.out 'http://127.0.0.1:6060/debug/pprof/profile?seconds=60' +``` + +### Memory + +To save a heap profile (containing information about all memory allocated so +far since startup), use + +```sh +curl -o mem.out http://127.0.0.1:6060/debug/pprof/heap +``` + +Sometimes it can be useful to get a delta log, i.e. to see how memory usage +developed from one point in time to another. For that, use + +```sh +curl -o mem.out 'http://127.0.0.1:6060/debug/pprof/heap?seconds=20' +``` + +This will log the memory usage difference between now and 20 seconds later, so +it gives you 20 seconds to perform the action in lazygit that you are interested +in measuring. + +## View profile data + +To display the profile data, you can either use speedscope.app, or the pprof +tool that comes with go. I prefer the former because it has a nicer UI and is a +little more powerful; however, I have seen cases where it wasn't able to load a +profile for some reason, in which case it's good to have the pprof tool as a +fallback. + +### Speedscope.app + +Go to https://www.speedscope.app/ in your browser, and drag the saved profile +onto the browser window. Refer to [the +documentation](https://github.com/jlfwong/speedscope?tab=readme-ov-file#usage) +for how to navigate the data. + +### Pprof tool + +To view a profile that you saved as `cpu.out`, use + +```sh +go tool pprof -http=:8080 cpu.out +``` + +By default this shows the graph view, which I don't find very useful myself. +Choose "Flame Graph" from the View menu to show a much more useful +representation of the data. diff --git a/docs-master/dev/README.md b/docs-master/dev/README.md new file mode 100644 index 00000000000..fcfcf2741ea --- /dev/null +++ b/docs-master/dev/README.md @@ -0,0 +1,8 @@ +# Dev Documentation Overview + +* [Codebase Guide](./Codebase_Guide.md) +* [Busy/Idle Tracking](./Busy.md) +* [Integration Tests](../../pkg/integration/README.md) +* [Demo Recordings](./Demo_Recordings.md) +* [Find base commit for fixup design](Find_Base_Commit_For_Fixup_Design.md) +* [Profiling](Profiling.md) diff --git a/docs-master/keybindings/Custom_Keybindings.md b/docs-master/keybindings/Custom_Keybindings.md new file mode 100644 index 00000000000..a2537f0696c --- /dev/null +++ b/docs-master/keybindings/Custom_Keybindings.md @@ -0,0 +1,63 @@ +## Possible keybindings +| Put in | You will get | +|---------------|----------------| +| `` | F1 | +| `` | F2 | +| `` | F3 | +| `` | F4 | +| `` | F5 | +| `` | F6 | +| `` | F7 | +| `` | F8 | +| `` | F9 | +| `` | F10 | +| `` | F11 | +| `` | F12 | +| `` | Insert | +| `` | Delete | +| `` | Home | +| `` | End | +| `` | Pgup | +| `` | Pgdn | +| `` | ArrowUp | +| `` | ShiftArrowUp | +| `` | ArrowDown | +| `` | ShiftArrowDown | +| `` | ArrowLeft | +| `` | ArrowRight | +| `` | Tab | +| `` | Backtab | +| `` | Enter | +| `` | AltEnter | +| `` | Esc | +| `` | Backspace | +| `` | CtrlSpace | +| `` | CtrlSlash | +| `` | Space | +| `` | CtrlA | +| `` | CtrlB | +| `` | CtrlC | +| `` | CtrlD | +| `` | CtrlE | +| `` | CtrlF | +| `` | CtrlG | +| `` | CtrlJ | +| `` | CtrlK | +| `` | CtrlL | +| `` | CtrlN | +| `` | CtrlO | +| `` | CtrlP | +| `` | CtrlQ | +| `` | CtrlR | +| `` | CtrlS | +| `` | CtrlT | +| `` | CtrlU | +| `` | CtrlV | +| `` | CtrlW | +| `` | CtrlX | +| `` | CtrlY | +| `` | CtrlZ | +| `` | Ctrl4 | +| `` | Ctrl5 | +| `` | Ctrl6 | +| `` | Ctrl8 | diff --git a/docs-master/keybindings/Keybindings_en.md b/docs-master/keybindings/Keybindings_en.md new file mode 100644 index 00000000000..f604bbf6ea8 --- /dev/null +++ b/docs-master/keybindings/Keybindings_en.md @@ -0,0 +1,413 @@ +_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 Keybindings + +_Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ + +## Global keybindings + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Switch to a recent repo | | +| `` (fn+up/shift+k) `` | Scroll up main window | | +| `` (fn+down/shift+j) `` | Scroll down main window | | +| `` @ `` | 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.

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 | | +| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers | +| `` `` | 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 | | +| `` `` | 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. | +| `` 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 + +| Key | Action | Info | +|-----|--------|-------------| +| `` , `` | Previous page | | +| `` . `` | Next page | | +| `` < () `` | Scroll to top | | +| `` > () `` | Scroll to bottom | | +| `` v `` | Toggle range select | | +| `` `` | Range select down | | +| `` `` | Range select up | | +| `` / `` | Search the current view by text | | +| `` H `` | Scroll left | | +| `` L `` | Scroll right | | +| `` ] `` | Next tab | | +| `` [ `` | Previous tab | | + +## Commit files + +| 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. | +| `` 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 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 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Confirm | | +| `` `` | Close | | + +## Commits + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy commit hash to clipboard | | +| `` `` | 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 | Reword the selected commit's message. | +| `` 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`. | +| `` 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). | +| `` `` | Move commit down one | | +| `` `` | Move commit up one | | +| `` V `` | Paste (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 commit with staged changes. If the selected commit is the HEAD commit, this will perform `git commit --amend`. Otherwise the commit will be amended via a rebase. | +| `` 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 `` | Tag commit | Create a new tag pointing at the selected commit. You'll be prompted to enter a tag name and optional description. | +| `` `` | View log options | View options for commit log e.g. changing sort order, hiding the git graph, showing the whole git graph. | +| `` `` | Checkout | Checkout the selected commit as a detached HEAD. | +| `` 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 | | + +## Confirmation panel + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Confirm | | +| `` `` | Close/Cancel | | +| `` `` | Copy to clipboard | | + +## Files + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy path to clipboard | | +| `` `` | Stage | Toggle staged for selected file. | +| `` `` | Filter files by status | | +| `` y `` | Copy to clipboard | | +| `` c `` | Commit | Commit staged changes. | +| `` w `` | Commit changes without pre-commit hook | | +| `` A `` | Amend last commit | | +| `` C `` | Commit changes using git editor | | +| `` `` | 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 | Open file in default application. | +| `` i `` | Ignore or exclude file | | +| `` r `` | Refresh files | | +| `` 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 `` | Stage all | 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 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 `` | View merge conflict options | View options for resolving merge conflicts. | +| `` 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 | +|-----|--------|-------------| +| `` `` | Copy branch name to clipboard | | +| `` 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 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. | +| `` M `` | Merge | 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 `` | New tag | | +| `` s `` | Sort order | | +| `` g `` | Reset | | +| `` 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 | | + +## Main panel (merging) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Pick hunk | | +| `` b `` | Pick all hunks | | +| `` `` | Previous hunk | | +| `` `` | Next hunk | | +| `` `` | Previous conflict | | +| `` `` | Next conflict | | +| `` z `` | Undo | Undo last merge conflict resolution. | +| `` e `` | Edit file | Open file in external editor. | +| `` o `` | Open file | Open file in default application. | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` `` | Return to files panel | | + +## Main panel (normal) + +| Key | Action | Info | +|-----|--------|-------------| +| `` 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) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Go to previous hunk | | +| `` `` | Go to next hunk | | +| `` v `` | Toggle range select | | +| `` 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. | +| `` `` | Toggle lines in patch | | +| `` `` | Exit custom patch builder | | +| `` / `` | Search the current view by text | | + +## Main panel (staging) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Go to previous hunk | | +| `` `` | Go to next hunk | | +| `` v `` | Toggle range select | | +| `` 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. | +| `` o `` | Open file | Open file in default application. | +| `` e `` | Edit file | Open file in external editor. | +| `` `` | Return to files panel | | +| `` `` | Switch view | Switch to other view (staged/unstaged changes). | +| `` E `` | Edit hunk | Edit selected hunk in external editor. | +| `` c `` | Commit | Commit staged changes. | +| `` w `` | Commit changes without pre-commit hook | | +| `` C `` | Commit changes using git editor | | +| `` `` | 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: | +| `` / `` | Search the current view by text | | + +## Menu + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Execute | | +| `` `` | Close/Cancel | | +| `` / `` | Filter the current view by text | | + +## Reflog + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy commit hash to clipboard | | +| `` `` | Checkout | Checkout the selected commit as a detached HEAD. | +| `` 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 | | + +## Remote branches + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy branch name to clipboard | | +| `` `` | Checkout | Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head. | +| `` n `` | New branch | | +| `` M `` | Merge | View options for merging the selected item into the current branch (regular merge, squash merge) | +| `` r `` | Rebase | Rebase the checked-out branch onto the selected branch. | +| `` d `` | Delete | Delete the remote branch from the remote. | +| `` u `` | Set as upstream | Set the selected remote branch as the upstream of the checked-out branch. | +| `` 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 | | + +## Remotes + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | View branches | | +| `` n `` | New remote | | +| `` d `` | Remove | Remove the selected remote. Any local branches tracking a remote branch from the remote will be unaffected. | +| `` e `` | Edit | Edit the selected remote's name or URL. | +| `` 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 | +|-----|--------|-------------| +| `` `` | Apply | 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 `` | 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 | | + +## Status + +| Key | Action | Info | +|-----|--------|-------------| +| `` o `` | Open config file | Open file in default application. | +| `` e `` | Edit config file | Open file in external editor. | +| `` u `` | Check for update | | +| `` `` | Switch to a recent repo | | +| `` a `` | Show/cycle all branch logs | | +| `` 0 `` | Focus main view | | + +## Sub-commits + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy commit hash to clipboard | | +| `` `` | Checkout | Checkout the selected commit as a detached HEAD. | +| `` 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 | | + +## Submodules + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy submodule name to clipboard | | +| `` `` | Enter | Enter submodule. After entering the submodule, you can press `` to escape back to the parent repo. | +| `` d `` | Remove | Remove the selected submodule and its corresponding directory. | +| `` u `` | Update | Update selected submodule. | +| `` n `` | New submodule | | +| `` e `` | Update submodule URL | | +| `` i `` | Initialize | Initialize the selected submodule to prepare for fetching. You probably want to follow this up by invoking the 'update' action to fetch the submodule. | +| `` b `` | View bulk submodule options | | +| `` / `` | Filter the current view by text | | + +## Tags + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 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 | | + +## 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 | | diff --git a/docs-master/keybindings/Keybindings_ja.md b/docs-master/keybindings/Keybindings_ja.md new file mode 100644 index 00000000000..121435fb34a --- /dev/null +++ b/docs-master/keybindings/Keybindings_ja.md @@ -0,0 +1,413 @@ +_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 キーバインディング + +_凡例:`<c-b>` はctrl+b、`<a-b>` はalt+b、`B` はshift+bを意味します_ + +## グローバルキーバインド + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 最近のリポジトリをチェックアウト | | +| `` (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`を実行しません。 | +| `` + `` | 次の画面モード(通常/半分/全画面) | | +| `` _ `` | 前の画面モード | | +| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers | +| `` `` | キャンセル | | +| `` ? `` | キーバインディングメニューを開く | | +| `` `` | フィルターオプションを表示 | コミットログのフィルタリングオプションを表示し、フィルタに一致するコミットのみを表示します。 | +| `` 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 `` | 範囲選択を切り替え | | +| `` `` | 範囲選択を下に | | +| `` `` | 範囲選択を上に | | +| `` / `` | 現在のビューをテキストで検索 | | +| `` H `` | 左にスクロール | | +| `` L `` | 右にスクロール | | +| `` ] `` | 次のタブ | | +| `` [ `` | 前のタブ | | + +## Input prompt + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 確認 | | +| `` `` | 閉じる/キャンセル | | + +## コミット + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | コミットハッシュをクリップボードにコピー | | +| `` `` | コピーされた(チェリーピックされた)コミットの選択をリセット | | +| `` 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 `` | ペースト(チェリーピック) | | +| `` B `` | リベース用のベースコミットとしてマーク | 次のリベース用のベースコミットを選択します。ブランチにリベースするとき、ベースコミットより上のコミットのみが持ち込まれます。これは `git rebase --onto` コマンドを使用します。 | +| `` A `` | 修正 | ステージされた変更でコミットを修正します。選択したコミットがHEADコミットの場合、これは `git commit --amend` を実行します。それ以外の場合、コミットはリベースを通じて修正されます。 | +| `` a `` | コミット属性を修正 | コミット作者の設定/リセットまたは共同作者の設定を行います。 | +| `` t `` | リバート | 選択したコミットの変更を逆に適用する、リバートコミットを作成します。 | +| `` T `` | コミットにタグを付ける | 選択したコミットを指すタグを新規作成します。タグ名とオプションの説明を入力するよう促されます。 | +| `` `` | ログオプションを表示 | コミットログのオプションを表示します(例:並び順の変更、Gitグラフの非表示、Gitグラフ全体の表示)。 | +| `` `` | チェックアウト(ブランチの切り替え) | 選択したコミットをデタッチドヘッド(特定のブランチに属さない状態)としてチェックアウトします。 | +| `` 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 | +|-----|--------|-------------| +| `` `` | パスをクリップボードにコピー | | +| `` 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 | +|-----|--------|-------------| +| `` `` | サブモジュール名をクリップボードにコピー | | +| `` `` | 入る | サブモジュールに入ります。サブモジュールに入った後、``を押して親リポジトリに戻ることができます。 | +| `` d `` | 削除 | 選択したサブモジュールとそれに対応するディレクトリを削除します。 | +| `` u `` | 更新 | 選択したサブモジュールを更新します。 | +| `` n `` | 新しいサブモジュール | | +| `` e `` | サブモジュールURLを更新 | | +| `` i `` | 初期化 | 選択したサブモジュールを初期化してフェッチの準備をします。おそらく、続いて「更新」アクションを呼び出してサブモジュールをフェッチしたいでしょう。 | +| `` b `` | 一括サブモジュールオプションを表示 | | +| `` / `` | 現在のビューをテキストでフィルタリング | | + +## スタッシュ + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 適用 | スタッシュエントリをワーキングディレクトリに適用します。 | +| `` g `` | ポップ | スタッシュエントリをワーキングディレクトリに適用し、スタッシュエントリを削除します。 | +| `` d `` | 削除 | スタッシュリストからスタッシュエントリを削除します。 | +| `` n `` | 新しいブランチ | 選択したスタッシュエントリから新しいブランチを作成します。これは、スタッシュエントリが作成されたコミットをgitがチェックアウトし、そのコミットから新しいブランチを作成した後、スタッシュエントリを追加のコミットとして新しいブランチに適用することで機能します。 | +| `` r `` | スタッシュの名前を変更 | | +| `` 0 `` | メインビューにフォーカス | | +| `` `` | ファイルを表示 | | +| `` w `` | ワークツリーオプションを表示 | | +| `` / `` | 現在のビューをテキストでフィルタリング | | + +## ステータス + +| Key | Action | Info | +|-----|--------|-------------| +| `` o `` | 設定ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 | +| `` e `` | 設定ファイルを編集 | 外部エディタでファイルを開きます。 | +| `` u `` | 更新を確認 | | +| `` `` | 最近のリポジトリをチェックアウト | | +| `` a `` | ブランチログの表示モードを順に切り替え | | +| `` 0 `` | メインビューにフォーカス | | + +## セカンダリ + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | ビューを切り替え | 他のビュー(ステージされた変更/ステージされていない変更)に切り替えます。 | +| `` `` | サイドパネルに戻る | | +| `` / `` | 現在のビューをテキストで検索 | | + +## タグ + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | タグをクリップボードにコピー | | +| `` `` | チェックアウト(ブランチの切り替え) | 選択したタグをデタッチドHEADとしてチェックアウトします。 | +| `` n `` | 新しいタグを作成 | 現在のコミットから新しいタグを作成します。タグ名とオプションの説明を入力するよう促されます。 | +| `` d `` | 削除 | ローカル/リモートタグの削除オプションを表示します。 | +| `` P `` | タグをプッシュ | 選択したタグをリモートにプッシュします。リモートを選択するよう促されます。 | +| `` g `` | リセット | 選択した項目へのリセットオプション(ソフト/ミックス/ハード)を表示します。各リセットタイプの詳細は次の通りです:
- ソフトリセット:変更を保持し、ステージされた状態にします
- ミックスリセット:変更を保持し、ステージされていない状態にします
- ハードリセット:すべての変更を破棄します | +| `` `` | 外部差分ツールを開く(git difftool) | | +| `` 0 `` | メインビューにフォーカス | | +| `` `` | コミットを表示 | | +| `` w `` | ワークツリーオプションを表示 | | +| `` / `` | 現在のビューをテキストでフィルタリング | | + +## ファイル + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | パスをクリップボードにコピー | | +| `` `` | ステージ | 選択したファイルのステージ状態を切り替えます。 | +| `` `` | ステータスでファイルをフィルタリング | | +| `` 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 `` | View merge conflict options | View options for resolving merge conflicts. | +| `` f `` | フェッチ | リモートから変更をフェッチします。 | +| `` - `` | すべてのファイルを折りたたむ | ファイルツリー内のすべてのディレクトリを折りたたみます | +| `` = `` | すべてのファイルを展開 | ファイルツリー内のすべてのディレクトリを展開します | +| `` 0 `` | メインビューにフォーカス | | +| `` / `` | 現在のビューをテキストで検索 | | + +## メインパネル(ステージング) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 前のハンクに移動 | | +| `` `` | 次のハンクに移動 | | +| `` v `` | 範囲選択を切り替え | | +| `` a `` | ハンクの選択を切り替える | Toggle line-by-line vs. hunk selection mode. | +| `` `` | 選択したテキストをクリップボードにコピー | | +| `` `` | ステージ | 選択された部分のステージ / アンステージを切り替えます。 | +| `` d `` | 破棄 | ステージされていない変更が選択されている場合、`git reset`を使用して変更を破棄します。ステージされた変更が選択されている場合、変更をアンステージします。 | +| `` o `` | ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 | +| `` e `` | ファイルを編集 | 外部エディタでファイルを開きます。 | +| `` `` | ファイルパネルに戻る | | +| `` `` | ビューを切り替え | 他のビュー(ステージされた変更/ステージされていない変更)に切り替えます。 | +| `` E `` | ハンクを編集 | 選択したハンクを外部エディタで編集します。 | +| `` c `` | コミット | ステージされた変更をコミットします。 | +| `` w `` | pre-commitフックなしで変更をコミット | | +| `` C `` | Gitエディタを使用して変更をコミット | | +| `` `` | フィックスアップのベースコミットを検索 | 現在の変更が基づいているコミットを見つけて、コミットの修正/フィックスアップを行います。これにより、ブランチのコミットを一つずつ確認して、どのコミットを修正/フィックスアップすべきかを調べる手間が省けます。詳細はドキュメントを参照: | +| `` / `` | 現在のビューをテキストで検索 | | + +## メインパネル(パッチ作成) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 前のハンクに移動 | | +| `` `` | 次のハンクに移動 | | +| `` v `` | 範囲選択を切り替え | | +| `` a `` | ハンクの選択を切り替える | Toggle line-by-line vs. hunk selection mode. | +| `` `` | 選択したテキストをクリップボードにコピー | | +| `` o `` | ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 | +| `` e `` | ファイルを編集 | 外部エディタでファイルを開きます。 | +| `` `` | パッチ内の行を切り替え | | +| `` `` | カスタムパッチビルダーを終了 | | +| `` / `` | 現在のビューをテキストで検索 | | + +## メインパネル(マージ中) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | ハンクを選択 | | +| `` b `` | すべてのハンクを選択 | | +| `` `` | 前のハンク | | +| `` `` | 次のハンク | | +| `` `` | 前のコンフリクト | | +| `` `` | 次のコンフリクト | | +| `` z `` | 元に戻す | 最後のマージコンフリクト解決を元に戻します。 | +| `` e `` | ファイルを編集 | 外部エディタでファイルを開きます。 | +| `` o `` | ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` `` | ファイルパネルに戻る | | + +## メインパネル(通常) + +| Key | Action | Info | +|-----|--------|-------------| +| `` mouse wheel down (fn+up) `` | 下にスクロール | | +| `` mouse wheel up (fn+down) `` | 上にスクロール | | +| `` `` | ビューを切り替え | 他のビュー(ステージされた変更/ステージされていない変更)に切り替えます。 | +| `` `` | サイドパネルに戻る | | +| `` / `` | 現在のビューをテキストで検索 | | + +## メニュー + +| 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 | +|-----|--------|-------------| +| `` `` | ブランチを表示 | | +| `` n `` | 新しいリモート | | +| `` d `` | 削除 | 選択したリモートを削除します。そのリモートからのリモートブランチを追跡しているローカルブランチは影響を受けません。 | +| `` e `` | 編集 | 選択したリモートの名前またはURLを編集します。 | +| `` f `` | フェッチ | リモートリポジトリから更新をフェッチします。これにより、ローカルブランチにマージせずに新しいコミットとブランチを取得します。 | +| `` / `` | 現在のビューをテキストでフィルタリング | | + +## リモートブランチ + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | ブランチ名をクリップボードにコピー | | +| `` `` | チェックアウト(ブランチの切り替え) | 選択したリモートブランチに基づいて新しいローカルブランチをチェックアウトするか、リモートブランチをデタッチドヘッドとしてチェックアウトします。 | +| `` n `` | 新しいブランチ | | +| `` M `` | マージ | 選択した項目を現在のブランチにマージするためのオプションを表示します(通常のマージ、スカッシュマージ) | +| `` r `` | リベース | チェックアウトしたブランチを選択したブランチ上にリベースします。 | +| `` d `` | 削除 | リモートからリモートブランチを削除します。 | +| `` u `` | アップストリームとして設定 | 選択したリモートブランチをチェックアウトされたブランチのアップストリームとして設定します。 | +| `` s `` | 並び順 | | +| `` g `` | リセット | 選択した項目へのリセットオプション(ソフト/ミックス/ハード)を表示します。各リセットタイプの詳細は次の通りです:
- ソフトリセット:変更を保持し、ステージされた状態にします
- ミックスリセット:変更を保持し、ステージされていない状態にします
- ハードリセット:すべての変更を破棄します | +| `` `` | 外部差分ツールを開く(git difftool) | | +| `` 0 `` | メインビューにフォーカス | | +| `` `` | コミットを表示 | | +| `` w `` | ワークツリーオプションを表示 | | +| `` / `` | 現在のビューをテキストでフィルタリング | | + +## ローカルブランチ + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | ブランチ名をクリップボードにコピー | | +| `` i `` | git-flowオプションを表示 | | +| `` `` | チェックアウト(ブランチの切り替え) | 選択した項目をチェックアウトします。 | +| `` 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). | +| `` o `` | プルリクエストを作成 | | +| `` O `` | プルリクエスト作成オプションを表示 | | +| `` `` | プルリクエストURLをクリップボードにコピー | | +| `` c `` | 名前でチェックアウト | 名前でチェックアウトします。入力ボックスに「-」を入力すると、最後のブランチをチェックアウトすることができます。 | +| `` - `` | 直前のブランチにチェックアウト | | +| `` F `` | 強制チェックアウト | 選択したブランチを強制的にチェックアウトします。これにより、選択したブランチをチェックアウトする前にワーキングディレクトリ内のすべてのローカル変更が破棄されます。 | +| `` d `` | 削除 | ローカル/リモートブランチの削除オプションを表示します。 | +| `` r `` | リベース | チェックアウトしたブランチを選択したブランチ上にリベースします。 | +| `` M `` | マージ | 選択した項目を現在のブランチにマージするためのオプションを表示します(通常のマージ、スカッシュマージ) | +| `` f `` | ブランチを最新化(fast-forward) | 選択したブランチを対応するアップストリームの最新状態に追いつかせます(fast-forward)。 | +| `` T `` | 新しいタグを作成 | | +| `` s `` | 並び順 | | +| `` g `` | リセット | | +| `` R `` | ブランチ名を変更 | | +| `` u `` | アップストリームオプションを表示 | ブランチのアップストリームに関連するオプションを表示します(例:アップストリームの設定/解除やアップストリームへのリセット)。 | +| `` `` | 外部差分ツールを開く(git difftool) | | +| `` 0 `` | メインビューにフォーカス | | +| `` `` | コミットを表示 | | +| `` w `` | ワークツリーオプションを表示 | | +| `` / `` | 現在のビューをテキストでフィルタリング | | + +## ワークツリー + +| Key | Action | Info | +|-----|--------|-------------| +| `` n `` | 新しいワークツリー | | +| `` `` | チェックアウト(切り替え) | 選択したワークツリーをチェックアウト(切り替え)します。 | +| `` o `` | エディタで開く | | +| `` d `` | 削除 | 選択したワークツリーを削除します。これはワークツリーのディレクトリとワークツリーに関するメタデータの両方を.gitディレクトリから削除します。 | +| `` / `` | 現在のビューをテキストでフィルタリング | | + +## 確認パネル + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 確認 | | +| `` `` | 閉じる/キャンセル | | +| `` `` | クリップボードにコピー | | diff --git a/docs-master/keybindings/Keybindings_ko.md b/docs-master/keybindings/Keybindings_ko.md new file mode 100644 index 00000000000..b338df06ecd --- /dev/null +++ b/docs-master/keybindings/Keybindings_ko.md @@ -0,0 +1,413 @@ +_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 키 바인딩 + +_Legend: `` means ctrl+b, `` means alt+b, `B` means 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 the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. | +| `` p `` | 업데이트 | 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.

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'. | +| `` } `` | Diff 보기의 변경 사항 주위에 표시되는 컨텍스트의 크기를 늘리기 | 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'. | +| `` { `` | Diff 보기의 변경 사항 주위에 표시되는 컨텍스트 크기 줄이기 | 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. | +| `` `` | 커스텀 Patch 옵션 보기 | | +| `` 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) | | +| `` _ `` | 이전 스크린 모드 | | +| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers | +| `` `` | 취소 | | +| `` ? `` | 매뉴 열기 | | +| `` `` | View filter-by-path options | View options for filtering the commit log, so that only commits matching the filter are shown. | +| `` W `` | Diff 메뉴 열기 | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. | +| `` `` | Diff 메뉴 열기 | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. | +| `` q `` | 종료 | | +| `` `` | Suspend the application | | +| `` `` | 공백문자를 Diff 뷰에서 표시 여부 전환 | 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 `` | 되돌리기 (reflog) (실험적) | 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. | +| `` Z `` | 다시 실행 (reflog) (실험적) | 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 + +| Key | Action | Info | +|-----|--------|-------------| +| `` , `` | 이전 페이지 | | +| `` . `` | 다음 페이지 | | +| `` < () `` | 맨 위로 스크롤 | | +| `` > () `` | 맨 아래로 스크롤 | | +| `` v `` | 드래그 선택 전환 | | +| `` `` | Range select down | | +| `` `` | Range select up | | +| `` / `` | 검색 시작 | | +| `` H `` | 우 스크롤 | | +| `` L `` | 좌 스크롤 | | +| `` ] `` | 이전 탭 | | +| `` [ `` | 다음 탭 | | + +## Input prompt + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 확인 | | +| `` `` | 닫기/취소 | | + +## Reflog + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 커밋 해시를 클립보드에 복사 | | +| `` `` | 체크아웃 | Checkout the selected commit as a detached HEAD. | +| `` y `` | 커밋 attribute 복사 | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). | +| `` o `` | 브라우저에서 커밋 열기 | | +| `` n `` | 커밋에서 새 브랜치를 만듭니다. | | +| `` 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 `` | View reset options | 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 cherry-picked (copied) commits selection | | +| `` `` | Open external diff tool (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | 커밋 보기 | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Secondary + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 패널 전환 | Switch to other view (staged/unstaged changes). | +| `` `` | Exit back to side panel | | +| `` / `` | 검색 시작 | | + +## Stash + +| 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 `` | Rename stash | | +| `` 0 `` | Focus main view | | +| `` `` | View selected item's files | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Sub-commits + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 커밋 해시를 클립보드에 복사 | | +| `` `` | 체크아웃 | Checkout the selected commit as a detached HEAD. | +| `` y `` | 커밋 attribute 복사 | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). | +| `` o `` | 브라우저에서 커밋 열기 | | +| `` n `` | 커밋에서 새 브랜치를 만듭니다. | | +| `` 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 `` | View reset options | 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 cherry-picked (copied) commits selection | | +| `` `` | Open external diff tool (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | View selected item's 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 | +|-----|--------|-------------| +| `` `` | 실행 | | +| `` `` | 닫기/취소 | | +| `` / `` | Filter the current view by text | | + +## 메인 패널 (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 `` | View merge conflict options | View options for resolving merge conflicts. | +| `` `` | 파일 목록으로 돌아가기 | | + +## 메인 패널 (Normal) + +| Key | Action | Info | +|-----|--------|-------------| +| `` mouse wheel down (fn+up) `` | 아래로 스크롤 | | +| `` mouse wheel up (fn+down) `` | 위로 스크롤 | | +| `` `` | 패널 전환 | Switch to other view (staged/unstaged changes). | +| `` `` | Exit back to side panel | | +| `` / `` | 검색 시작 | | + +## 메인 패널 (Patch Building) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 이전 hunk를 선택 | | +| `` `` | 다음 hunk를 선택 | | +| `` v `` | 드래그 선택 전환 | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | 선택한 텍스트를 클립보드에 복사 | | +| `` o `` | 파일 닫기 | Open file in default application. | +| `` e `` | 파일 편집 | Open file in external editor. | +| `` `` | Line(s)을 패치에 추가/삭제 | | +| `` `` | Exit custom patch builder | | +| `` / `` | 검색 시작 | | + +## 메인 패널 (Staging) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 이전 hunk를 선택 | | +| `` `` | 다음 hunk를 선택 | | +| `` v `` | 드래그 선택 전환 | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | 선택한 텍스트를 클립보드에 복사 | | +| `` `` | Staged 전환 | 선택한 행을 staged / unstaged | +| `` 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 `` | 커밋 변경내용 | 스테이징된 변경 사항 커밋. | +| `` w `` | Commit changes without pre-commit hook | | +| `` 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: | +| `` / `` | 검색 시작 | | + +## 브랜치 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 브랜치명을 클립보드에 복사 | | +| `` i `` | Git-flow 옵션 보기 | | +| `` `` | 체크아웃 | Checkout selected item. | +| `` n `` | 새 브랜치 생성 | | +| `` 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 `` | 풀 리퀘스트 생성 | | +| `` O `` | 풀 리퀘스트 생성 옵션 | | +| `` `` | 풀 리퀘스트 URL을 클립보드에 복사 | | +| `` c `` | 이름으로 체크아웃 | Checkout by name. In the input box you can enter '-' to switch to the previous branch. | +| `` - `` | Checkout previous branch | | +| `` F `` | 강제 체크아웃 | Force checkout selected branch. This will discard all local changes in your working directory before checking out the selected branch. | +| `` d `` | 삭제 | View delete options for local/remote branch. | +| `` r `` | 체크아웃된 브랜치를 이 브랜치에 리베이스 | 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 this branch from its upstream | Fast-forward selected branch from its upstream. | +| `` T `` | 태그를 생성 | | +| `` s `` | Sort order | | +| `` g `` | View reset options | | +| `` 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) | | +| `` 0 `` | Focus main view | | +| `` `` | 커밋 보기 | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## 상태 + +| Key | Action | Info | +|-----|--------|-------------| +| `` o `` | 설정 파일 열기 | Open file in default application. | +| `` e `` | 설정 파일 수정 | Open file in external editor. | +| `` u `` | 업데이트 확인 | | +| `` `` | 최근에 사용한 저장소로 전환 | | +| `` a `` | Show/cycle all branch logs | | +| `` 0 `` | Focus main view | | + +## 서브모듈 + +| 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 | | + +## 원격 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | View branches | | +| `` n `` | 새로운 Remote 추가 | | +| `` d `` | Remove | Remove the selected remote. Any local branches tracking a remote branch from the remote will be unaffected. | +| `` e `` | Edit | Remote를 수정 | +| `` f `` | Fetch | 원격을 업데이트 | +| `` / `` | Filter the current view by text | | + +## 원격 브랜치 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 브랜치명을 클립보드에 복사 | | +| `` `` | 체크아웃 | Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head. | +| `` n `` | 새 브랜치 생성 | | +| `` M `` | 현재 브랜치에 병합 | View options for merging the selected item into the current branch (regular merge, squash merge) | +| `` r `` | 체크아웃된 브랜치를 이 브랜치에 리베이스 | Rebase the checked-out branch onto the selected branch. | +| `` d `` | 삭제 | Delete the remote branch from the remote. | +| `` u `` | Set as upstream | Set the selected remote branch as the upstream of the checked-out branch. | +| `` s `` | Sort order | | +| `` g `` | View reset options | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` `` | Open external diff tool (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | 커밋 보기 | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## 커밋 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 커밋 해시를 클립보드에 복사 | | +| `` `` | Reset cherry-picked (copied) commits selection | | +| `` b `` | Bisect 옵션 보기 | | +| `` s `` | 스쿼시 | 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 | Pick commit (when mid-rebase) | +| `` F `` | Create fixup commit | Create fixup commit for this commit | +| `` S `` | Apply fixup commits | Squash all 'fixup!' commits above selected commit (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 commit with staged changes | +| `` 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 `` | Tag commit | 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 `` | 커밋 attribute 복사 | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). | +| `` o `` | 브라우저에서 커밋 열기 | | +| `` n `` | 커밋에서 새 브랜치를 만듭니다. | | +| `` 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 `` | View reset options | 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) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | View selected item's files | | +| `` w `` | View worktree options | | +| `` / `` | 검색 시작 | | + +## 커밋 파일 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 파일명을 클립보드에 복사 | | +| `` y `` | 클립보드에 복사 | | +| `` c `` | 체크아웃 | Checkout file | +| `` d `` | Remove | Discard this commit's changes to 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 included in patch | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` `` | Enter file to add selected lines to the patch (or 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.

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 | | +| `` / `` | 검색 시작 | | + +## 커밋메시지 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 확인 | | +| `` `` | 닫기 | | + +## 태그 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy tag to clipboard | | +| `` `` | 체크아웃 | Checkout the selected 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 `` | 삭제 | 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 `` | 초기화 | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` `` | Open external diff tool (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | 커밋 보기 | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## 파일 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 파일명을 클립보드에 복사 | | +| `` `` | Staged 전환 | Toggle staged for selected file. | +| `` `` | 파일을 필터하기 (Staged/unstaged) | | +| `` y `` | 클립보드에 복사 | | +| `` c `` | 커밋 변경내용 | 스테이징된 변경 사항 커밋. | +| `` w `` | Commit changes without pre-commit hook | | +| `` A `` | 마지맛 커밋 수정 | | +| `` 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 file | | +| `` r `` | 파일 새로고침 | | +| `` s `` | Stash | Stash all changes. For other variations of stashing, use the view stash options keybinding. | +| `` S `` | Stash 옵션 보기 | View stash options (e.g. stash all, stash staged, stash unstaged). | +| `` a `` | 모든 변경을 Staged/unstaged으로 전환 | Toggle staged/unstaged for all files in working tree. | +| `` `` | Stage individual hunks/lines for file, or collapse/expand for 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 `` | View 'discard changes' options | View options for discarding changes to the selected file. | +| `` g `` | View upstream reset options | | +| `` D `` | 초기화 | 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.

The default can be changed in the config file with the key 'gui.showFileTree'. | +| `` `` | Open external diff tool (git difftool) | | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` 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 | | +| `` / `` | 검색 시작 | | + +## 확인 패널 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 확인 | | +| `` `` | 닫기/취소 | | +| `` `` | 클립보드에 복사 | | diff --git a/docs-master/keybindings/Keybindings_nl.md b/docs-master/keybindings/Keybindings_nl.md new file mode 100644 index 00000000000..9d412388644 --- /dev/null +++ b/docs-master/keybindings/Keybindings_nl.md @@ -0,0 +1,413 @@ +_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 Sneltoetsen + +_Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ + +## Globale sneltoetsen + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Wissel naar een recente repo | | +| `` (fn+up/shift+k) `` | Scroll naar beneden vanaf hoofdpaneel | | +| `` (fn+down/shift+j) `` | Scroll naar beneden vanaf hoofdpaneel | | +| `` @ `` | 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.

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. | +| `` `` | Bekijk aangepaste patch opties | | +| `` m `` | Bekijk merge/rebase opties | View options to abort/continue/skip the current merge/rebase. | +| `` R `` | Verversen | 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`. | +| `` + `` | Volgende scherm modus (normaal/half/groot) | | +| `` _ `` | Vorige scherm modus | | +| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers | +| `` `` | Annuleren | | +| `` ? `` | Open menu | | +| `` `` | Bekijk scoping opties | View options for filtering the commit log, so that only commits matching the filter are shown. | +| `` W `` | Open diff menu | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. | +| `` `` | Open diff menu | 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 | | +| `` `` | 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 `` | Ongedaan maken (via reflog) (experimenteel) | 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. | +| `` Z `` | Redo (via reflog) (experimenteel) | 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. | + +## Lijstpaneel navigatie + +| Key | Action | Info | +|-----|--------|-------------| +| `` , `` | Vorige pagina | | +| `` . `` | Volgende pagina | | +| `` < () `` | Scroll naar boven | | +| `` > () `` | Scroll naar beneden | | +| `` v `` | Toggle drag selecteer | | +| `` `` | Range select down | | +| `` `` | Range select up | | +| `` / `` | Start met zoeken | | +| `` H `` | Scroll left | | +| `` L `` | Scroll right | | +| `` ] `` | Volgende tabblad | | +| `` [ `` | Vorige tabblad | | + +## Bestanden + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopieer de bestandsnaam naar het klembord | | +| `` `` | Toggle staged | Toggle staged for selected file. | +| `` `` | Filter files by status | | +| `` y `` | Copy to clipboard | | +| `` c `` | Commit veranderingen | Commit staged changes. | +| `` w `` | Commit veranderingen zonder pre-commit hook | | +| `` A `` | Wijzig laatste commit | | +| `` C `` | Commit veranderingen met de git editor | | +| `` `` | 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 bestand | Open file in default application. | +| `` i `` | Ignore or exclude file | | +| `` r `` | Refresh bestanden | | +| `` s `` | Stash | Stash all changes. For other variations of stashing, use the view stash options keybinding. | +| `` S `` | Bekijk stash opties | View stash options (e.g. stash all, stash staged, stash unstaged). | +| `` a `` | Toggle staged alle | Toggle staged/unstaged for all files in working tree. | +| `` `` | Stage individuele hunks/lijnen | 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 `` | Bekijk 'veranderingen ongedaan maken' opties | View options for discarding changes to the selected file. | +| `` g `` | Bekijk upstream reset opties | | +| `` D `` | Reset | View reset options for working tree (e.g. nuking the working tree). | +| `` ` `` | Toggle bestandsboom weergave | 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 `` | View merge conflict options | View options for resolving merge conflicts. | +| `` 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 | | +| `` / `` | Start met zoeken | | + +## Bevestigingspaneel + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Bevestig | | +| `` `` | Sluiten | | +| `` `` | Copy to clipboard | | + +## Branches + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopieer branch name naar klembord | | +| `` i `` | Laat git-flow opties zien | | +| `` `` | Uitchecken | Checkout selected item. | +| `` n `` | Nieuwe 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 `` | Maak een pull-request | | +| `` O `` | Bekijk opties voor pull-aanvraag | | +| `` `` | Kopieer de URL van het pull-verzoek naar het klembord | | +| `` c `` | Uitchecken bij naam | Checkout by name. In the input box you can enter '-' to switch to the previous branch. | +| `` - `` | Checkout previous branch | | +| `` F `` | Forceer 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 branch | Rebase the checked-out branch onto the selected branch. | +| `` M `` | Merge in met huidige checked out branch | View options for merging the selected item into the current branch (regular merge, squash merge) | +| `` f `` | Fast-forward deze branch vanaf zijn upstream | Fast-forward selected branch from its upstream. | +| `` T `` | Creëer tag | | +| `` s `` | Sort order | | +| `` g `` | Bekijk reset opties | | +| `` R `` | Hernoem 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 | | +| `` `` | Bekijk commits | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Commit bericht + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Bevestig | | +| `` `` | Sluiten | | + +## Commit bestanden + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopieer de bestandsnaam naar het klembord | | +| `` y `` | Copy to clipboard | | +| `` c `` | Uitchecken | Bestand uitchecken | +| `` d `` | Remove | Uitsluit deze commit zijn veranderingen aan dit bestand | +| `` o `` | Open bestand | Open file in default application. | +| `` e `` | Edit | Open file in external editor. | +| `` `` | Open external diff tool (git difftool) | | +| `` `` | Toggle bestand inbegrepen 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 bestand om geselecteerde regels toe te voegen aan de patch | 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 bestandsboom weergave | 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 | | +| `` / `` | Start met zoeken | | + +## Commits + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopieer commit hash naar klembord | | +| `` `` | Reset cherry-picked (gekopieerde) commits selectie | | +| `` 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 `` | Hernoem commit | Reword the selected commit's message. | +| `` R `` | Hernoem commit met editor | | +| `` d `` | Verwijder commit | 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) | Wijzig commit | +| `` 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 | Kies commit (wanneer midden in rebase) | +| `` F `` | Creëer fixup commit | Creëer fixup commit | +| `` S `` | Apply fixup commits | Squash bovenstaande commits | +| `` `` | Verplaats commit 1 naar beneden | | +| `` `` | Verplaats commit 1 naar boven | | +| `` V `` | Plak commits (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 | Wijzig commit met staged veranderingen | +| `` 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 `` | Tag commit | Create a new tag pointing at the selected commit. You'll be prompted to enter a tag name and optional description. | +| `` `` | View log options | View options for commit log e.g. changing sort order, hiding the git graph, showing the whole git graph. | +| `` `` | Uitchecken | Checkout the selected commit as a detached HEAD. | +| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). | +| `` o `` | Open commit in browser | | +| `` n `` | Creëer nieuwe branch van 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 `` | Bekijk reset opties | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` C `` | Kopieer commit (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 | | +| `` `` | Bekijk gecommite bestanden | | +| `` w `` | View worktree options | | +| `` / `` | Start met zoeken | | + +## Input prompt + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Bevestig | | +| `` `` | Sluiten | | + +## Menu + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Uitvoeren | | +| `` `` | Sluiten | | +| `` / `` | Filter the current view by text | | + +## Mergen + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kies stuk | | +| `` b `` | Kies beide stukken | | +| `` `` | Selecteer bovenste hunk | | +| `` `` | Selecteer onderste hunk | | +| `` `` | Selecteer voorgaand conflict | | +| `` `` | Selecteer volgende conflict | | +| `` z `` | Ongedaan maken | Undo last merge conflict resolution. | +| `` e `` | Verander bestand | Open file in external editor. | +| `` o `` | Open bestand | Open file in default application. | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` `` | Ga terug naar het bestanden paneel | | + +## Normaal + +| Key | Action | Info | +|-----|--------|-------------| +| `` mouse wheel down (fn+up) `` | Scroll omlaag | | +| `` mouse wheel up (fn+down) `` | Scroll omhoog | | +| `` `` | Ga naar een ander paneel | Switch to other view (staged/unstaged changes). | +| `` `` | Exit back to side panel | | +| `` / `` | Start met zoeken | | + +## Patch bouwen + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Selecteer de vorige hunk | | +| `` `` | Selecteer de volgende hunk | | +| `` v `` | Toggle drag selecteer | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | Copy selected text to clipboard | | +| `` o `` | Open bestand | Open file in default application. | +| `` e `` | Verander bestand | Open file in external editor. | +| `` `` | Voeg toe/verwijder lijn(en) in patch | | +| `` `` | Sluit lijn-bij-lijn modus | | +| `` / `` | Start met zoeken | | + +## Reflog + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopieer commit hash naar klembord | | +| `` `` | Uitchecken | Checkout the selected commit as a detached HEAD. | +| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). | +| `` o `` | Open commit in browser | | +| `` n `` | Creëer nieuwe branch van 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 `` | Bekijk reset opties | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` C `` | Kopieer commit (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 cherry-picked (gekopieerde) commits selectie | | +| `` `` | Open external diff tool (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Bekijk commits | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Remote branches + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopieer branch name naar klembord | | +| `` `` | Uitchecken | Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head. | +| `` n `` | Nieuwe branch | | +| `` M `` | Merge in met huidige checked out branch | View options for merging the selected item into the current branch (regular merge, squash merge) | +| `` r `` | Rebase branch | Rebase the checked-out branch onto the selected branch. | +| `` d `` | Delete | Delete the remote branch from the remote. | +| `` u `` | Set as upstream | Stel in als upstream van uitgecheckte branch | +| `` s `` | Sort order | | +| `` g `` | Bekijk reset opties | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` `` | Open external diff tool (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | Bekijk commits | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Remotes + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | View branches | | +| `` n `` | Voeg een nieuwe remote toe | | +| `` d `` | Remove | Remove the selected remote. Any local branches tracking a remote branch from the remote will be unaffected. | +| `` e `` | Edit | Wijzig remote | +| `` f `` | Fetch | Fetch remote | +| `` / `` | Filter the current view by text | | + +## Secondary + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Ga naar een ander paneel | Switch to other view (staged/unstaged changes). | +| `` `` | Exit back to side panel | | +| `` / `` | Start met zoeken | | + +## Staging + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Selecteer de vorige hunk | | +| `` `` | Selecteer de volgende hunk | | +| `` v `` | Toggle drag selecteer | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | Copy selected text to clipboard | | +| `` `` | Toggle staged | Toggle lijnen staged / unstaged | +| `` d `` | Verwijdert change (git reset) | When unstaged change is selected, discard the change using `git reset`. When staged change is selected, unstage the change. | +| `` o `` | Open bestand | Open file in default application. | +| `` e `` | Verander bestand | Open file in external editor. | +| `` `` | Ga terug naar het bestanden paneel | | +| `` `` | Ga naar een ander paneel | Switch to other view (staged/unstaged changes). | +| `` E `` | Edit hunk | Edit selected hunk in external editor. | +| `` c `` | Commit veranderingen | Commit staged changes. | +| `` w `` | Commit veranderingen zonder pre-commit hook | | +| `` C `` | Commit veranderingen met de git editor | | +| `` `` | 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: | +| `` / `` | Start met zoeken | | + +## Stash + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Toepassen | Apply the stash entry to your working directory. | +| `` g `` | Pop | Apply the stash entry to your working directory and remove the stash entry. | +| `` d `` | Laten vallen | Remove the stash entry from the stash list. | +| `` n `` | Nieuwe 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 | | +| `` `` | Bekijk gecommite bestanden | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Status + +| Key | Action | Info | +|-----|--------|-------------| +| `` o `` | Open config bestand | Open file in default application. | +| `` e `` | Verander config bestand | Open file in external editor. | +| `` u `` | Check voor updates | | +| `` `` | Wissel naar een recente repo | | +| `` a `` | Show/cycle all branch logs | | +| `` 0 `` | Focus main view | | + +## Sub-commits + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopieer commit hash naar klembord | | +| `` `` | Uitchecken | Checkout the selected commit as a detached HEAD. | +| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). | +| `` o `` | Open commit in browser | | +| `` n `` | Creëer nieuwe branch van 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 `` | Bekijk reset opties | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` C `` | Kopieer commit (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 cherry-picked (gekopieerde) commits selectie | | +| `` `` | Open external diff tool (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Bekijk gecommite bestanden | | +| `` w `` | View worktree options | | +| `` / `` | Start met zoeken | | + +## Submodules + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopieer submodule naam naar klembord | | +| `` `` | Enter | Enter submodule | +| `` d `` | Remove | Remove the selected submodule and its corresponding directory. | +| `` u `` | Update | Update selected submodule. | +| `` n `` | Voeg nieuwe submodule toe | | +| `` e `` | Update submodule URL | | +| `` i `` | Initialize | Initialiseer submodule | +| `` b `` | Bekijk bulk submodule opties | | +| `` / `` | Filter the current view by text | | + +## Tags + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy tag to clipboard | | +| `` `` | Uitchecken | Checkout the selected tag as a detached HEAD. | +| `` n `` | Creëer 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 | | +| `` `` | Bekijk commits | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## 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 | | diff --git a/docs-master/keybindings/Keybindings_pl.md b/docs-master/keybindings/Keybindings_pl.md new file mode 100644 index 00000000000..3bf21981244 --- /dev/null +++ b/docs-master/keybindings/Keybindings_pl.md @@ -0,0 +1,413 @@ +_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 Skróty klawiszowe + +_Legenda: `` oznacza ctrl+b, `` oznacza alt+b, `B` oznacza shift+b_ + +## Globalne skróty klawiszowe + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Przełącz na ostatnie repozytorium | | +| `` (fn+up/shift+k) `` | Przewiń główne okno w górę | | +| `` (fn+down/shift+j) `` | Przewiń główne okno w dół | | +| `` @ `` | Pokaż opcje dziennika poleceń | Pokaż opcje dla dziennika poleceń, np. pokazywanie/ukrywanie dziennika poleceń i skupienie na dzienniku poleceń. | +| `` P `` | Wypchnij | Wypchnij bieżącą gałąź do jej gałęzi nadrzędnej. Jeśli nie skonfigurowano gałęzi nadrzędnej, zostaniesz poproszony o skonfigurowanie gałęzi nadrzędnej. | +| `` p `` | Pociągnij | Pociągnij zmiany z zdalnego dla bieżącej gałęzi. Jeśli nie skonfigurowano gałęzi nadrzędnej, zostaniesz poproszony o skonfigurowanie gałęzi nadrzędnej. | +| `` ) `` | 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'. | +| `` } `` | Zwiększ rozmiar kontekstu w widoku różnic | 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'. | +| `` { `` | Zmniejsz rozmiar kontekstu w widoku różnic | 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. | +| `` `` | Wyświetl opcje niestandardowej łatki | | +| `` m `` | Pokaż opcje scalania/rebase | Pokaż opcje do przerwania/kontynuowania/pominięcia bieżącego scalania/rebase. | +| `` R `` | Odśwież | Odśwież stan git (tj. uruchom `git status`, `git branch`, itp. w tle, aby zaktualizować zawartość paneli). To nie uruchamia `git fetch`. | +| `` + `` | Następny tryb ekranu (normalny/półpełny/pełnoekranowy) | | +| `` _ `` | Poprzedni tryb ekranu | | +| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers | +| `` `` | Anuluj | | +| `` ? `` | Otwórz menu przypisań klawiszy | | +| `` `` | Pokaż opcje filtrowania | Pokaż opcje filtrowania dziennika commitów, tak aby pokazywane były tylko commity pasujące do filtra. | +| `` W `` | Pokaż opcje różnicowania | Pokaż opcje dotyczące różnicowania dwóch refów, np. różnicowanie względem wybranego refa, wprowadzanie refa do różnicowania i odwracanie kierunku różnic. | +| `` `` | Pokaż opcje różnicowania | Pokaż opcje dotyczące różnicowania dwóch refów, np. różnicowanie względem wybranego refa, wprowadzanie refa do różnicowania i odwracanie kierunku różnic. | +| `` q `` | Wyjdź | | +| `` `` | Suspend the application | | +| `` `` | Przełącz białe znaki | 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 `` | Cofnij | Dziennik reflog zostanie użyty do określenia, jakie polecenie git należy uruchomić, aby cofnąć ostatnie polecenie git. Nie obejmuje to zmian w drzewie roboczym; brane są pod uwagę tylko commity. | +| `` Z `` | Ponów | Dziennik reflog zostanie użyty do określenia, jakie polecenie git należy uruchomić, aby ponowić ostatnie polecenie git. Nie obejmuje to zmian w drzewie roboczym; brane są pod uwagę tylko commity. | + +## Nawigacja panelu listy + +| Key | Action | Info | +|-----|--------|-------------| +| `` , `` | Poprzednia strona | | +| `` . `` | Następna strona | | +| `` < () `` | Przewiń do góry | | +| `` > () `` | Przewiń do dołu | | +| `` v `` | Przełącz zaznaczenie zakresu | | +| `` `` | Zaznacz zakres w dół | | +| `` `` | Zaznacz zakres w górę | | +| `` / `` | Szukaj w bieżącym widoku po tekście | | +| `` H `` | Przewiń w lewo | | +| `` L `` | Przewiń w prawo | | +| `` ] `` | Następna zakładka | | +| `` [ `` | Poprzednia zakładka | | + +## Commity + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopiuj hash commita do schowka | | +| `` `` | Resetuj wybrane (cherry-picked) commity | | +| `` b `` | Zobacz opcje bisect | | +| `` s `` | Scal | Scal wybrany commit z commitami poniżej. Wiadomość wybranego commita zostanie dołączona do commita poniżej. | +| `` f `` | Poprawka | Włącz wybrany commit do commita poniżej. Podobnie do fixup, ale wiadomość wybranego commita zostanie odrzucona. | +| `` r `` | Przeformułuj | Przeformułuj wiadomość wybranego commita. | +| `` R `` | Przeformułuj za pomocą edytora | | +| `` d `` | Usuń | Usuń wybrany commit. To usunie commit z gałęzi za pomocą rebazowania. Jeśli commit wprowadza zmiany, od których zależą późniejsze commity, być może będziesz musiał rozwiązać konflikty scalania. | +| `` e `` | Edytuj (rozpocznij interaktywne rebazowanie) | Edytuj wybrany commit. Użyj tego, aby rozpocząć interaktywne rebazowanie od wybranego commita. Podczas trwania rebazowania, to oznaczy wybrany commit do edycji, co oznacza, że po kontynuacji rebazowania, rebazowanie zostanie wstrzymane na wybranym commicie, aby umożliwić wprowadzenie zmian. | +| `` i `` | Rozpocznij interaktywny rebase | Rozpocznij interaktywny rebase dla commitów na twoim branchu. To będzie zawierać wszystkie commity od HEAD do pierwszego commita scalenia lub commita głównego brancha.
Jeśli chcesz zamiast tego rozpocząć interaktywny rebase od wybranego commita, naciśnij `e`. | +| `` p `` | Wybierz | Oznacz wybrany commit do wybrania (podczas rebazowania). Oznacza to, że commit zostanie zachowany po kontynuacji rebazowania. | +| `` F `` | Utwórz commit fixup | Utwórz commit 'fixup!' dla wybranego commita. Później możesz nacisnąć `S` na tym samym commicie, aby zastosować wszystkie powyższe commity fixup. | +| `` S `` | Zastosuj commity fixup | Scal wszystkie commity 'fixup!', albo powyżej wybranego commita, albo wszystkie w bieżącej gałęzi (autosquash). | +| `` `` | Przesuń commit w dół | | +| `` `` | Przesuń commit w górę | | +| `` V `` | Wklej (cherry-pick) | | +| `` B `` | Oznacz jako bazowy commit dla rebase | Wybierz bazowy commit dla następnego rebase. Kiedy robisz rebase na branch, tylko commity powyżej bazowego commita zostaną przeniesione. Używa to polecenia `git rebase --onto`. | +| `` A `` | Popraw | Popraw commit ze zmianami zatwierdzonymi. Jeśli wybrany commit jest commit HEAD, to wykona `git commit --amend`. W przeciwnym razie commit zostanie poprawiony za pomocą rebazowania. | +| `` a `` | Popraw atrybut commita | Ustaw/Resetuj autora commita lub ustaw współautora. | +| `` t `` | Cofnij | Utwórz commit cofający dla wybranego commita, który stosuje zmiany wybranego commita w odwrotnej kolejności. | +| `` T `` | Otaguj commit | Utwórz nowy tag wskazujący na wybrany commit. Zostaniesz poproszony o wprowadzenie nazwy tagu i opcjonalnego opisu. | +| `` `` | Zobacz opcje logów | Zobacz opcje dla logów commitów, np. zmiana kolejności sortowania, ukrywanie grafu gita, pokazywanie całego grafu gita. | +| `` `` | Przełącz | Przełącz wybrany commit jako odłączoną HEAD. | +| `` y `` | Kopiuj atrybut commita do schowka | Kopiuj atrybut commita do schowka (np. hash, URL, różnice, wiadomość, autor). | +| `` o `` | Otwórz commit w przeglądarce | | +| `` n `` | Utwórz nową gałąź z commita | | +| `` 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 | Wyświetl opcje resetu (miękki/mieszany/twardy) do wybranego elementu. | +| `` C `` | Kopiuj (cherry-pick) | Oznacz commit jako skopiowany. Następnie, w widoku lokalnych commitów, możesz nacisnąć `V`, aby wkleić (cherry-pick) skopiowane commity do sprawdzonej gałęzi. W dowolnym momencie możesz nacisnąć ``, aby anulować zaznaczenie. | +| `` `` | Otwórz zewnętrzne narzędzie różnic (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Wyświetl pliki | | +| `` w `` | Zobacz opcje drzewa pracy | | +| `` / `` | Szukaj w bieżącym widoku po tekście | | + +## Dodatkowy + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Przełącz widok | Przełącz na inny widok (zatwierdzone/niezatwierdzone zmiany). | +| `` `` | Exit back to side panel | | +| `` / `` | Szukaj w bieżącym widoku po tekście | | + +## Drzewa pracy + +| Key | Action | Info | +|-----|--------|-------------| +| `` n `` | Nowe drzewo pracy | | +| `` `` | Przełącz | Przełącz do wybranego drzewa pracy. | +| `` o `` | Otwórz w edytorze | | +| `` d `` | Usuń | Usuń wybrane drzewo pracy. To usunie zarówno katalog drzewa pracy, jak i metadane o drzewie pracy w katalogu .git. | +| `` / `` | Filtruj bieżący widok po tekście | | + +## Główny panel (budowanie łatki) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Idź do poprzedniego fragmentu | | +| `` `` | Idź do następnego fragmentu | | +| `` v `` | Przełącz zaznaczenie zakresu | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | Kopiuj zaznaczony tekst do schowka | | +| `` o `` | Otwórz plik | Otwórz plik w domyślnej aplikacji. | +| `` e `` | Edytuj plik | Otwórz plik w zewnętrznym edytorze. | +| `` `` | Przełącz linie w łatce | | +| `` `` | Wyjdź z budowniczego niestandardowej łatki | | +| `` / `` | Szukaj w bieżącym widoku po tekście | | + +## Input prompt + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Potwierdź | | +| `` `` | Zamknij/Anuluj | | + +## Lokalne gałęzie + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopiuj nazwę gałęzi do schowka | | +| `` i `` | Pokaż opcje git-flow | | +| `` `` | Przełącz | Przełącz wybrany element. | +| `` n `` | Nowa gałąź | | +| `` 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 `` | Utwórz żądanie ściągnięcia | | +| `` O `` | Zobacz opcje tworzenia pull requesta | | +| `` `` | Kopiuj adres URL żądania ściągnięcia do schowka | | +| `` c `` | Przełącz według nazwy | Przełącz według nazwy. W polu wprowadzania możesz wpisać '-' aby przełączyć się na ostatnią gałąź. | +| `` - `` | Checkout previous branch | | +| `` F `` | Wymuś przełączenie | Wymuś przełączenie wybranej gałęzi. To spowoduje odrzucenie wszystkich lokalnych zmian w drzewie roboczym przed przełączeniem na wybraną gałąź. | +| `` d `` | Usuń | Wyświetl opcje usuwania lokalnej/odległej gałęzi. | +| `` r `` | Przebazuj | Przebazuj przełączoną gałąź na wybraną gałąź. | +| `` M `` | Scal | Scal wybraną gałąź z aktualnie sprawdzoną gałęzią. | +| `` f `` | Szybkie przewijanie | Szybkie przewijanie wybranej gałęzi z jej źródła. | +| `` T `` | Nowy tag | | +| `` s `` | Kolejność sortowania | | +| `` g `` | Reset | | +| `` R `` | Zmień nazwę gałęzi | | +| `` u `` | Pokaż opcje upstream | Pokaż opcje dotyczące upstream gałęzi, np. ustawianie/usuwanie upstream i resetowanie do upstream. | +| `` `` | Otwórz zewnętrzne narzędzie różnic (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | Pokaż commity | | +| `` w `` | Zobacz opcje drzewa pracy | | +| `` / `` | Filtruj bieżący widok po tekście | | + +## Menu + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Wykonaj | | +| `` `` | Zamknij/Anuluj | | +| `` / `` | Filtruj bieżący widok po tekście | | + +## Panel główny (normalny) + +| Key | Action | Info | +|-----|--------|-------------| +| `` mouse wheel down (fn+up) `` | Przewiń w dół | | +| `` mouse wheel up (fn+down) `` | Przewiń w górę | | +| `` `` | Przełącz widok | Przełącz na inny widok (zatwierdzone/niezatwierdzone zmiany). | +| `` `` | Exit back to side panel | | +| `` / `` | Szukaj w bieżącym widoku po tekście | | + +## Panel główny (scalanie) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Wybierz fragment | | +| `` b `` | Wybierz wszystkie fragmenty | | +| `` `` | Poprzedni fragment | | +| `` `` | Następny fragment | | +| `` `` | Poprzedni konflikt | | +| `` `` | Następny konflikt | | +| `` z `` | Cofnij | Cofnij ostatnie rozwiązanie konfliktu scalania. | +| `` e `` | Edytuj plik | Otwórz plik w zewnętrznym edytorze. | +| `` o `` | Otwórz plik | Otwórz plik w domyślnej aplikacji. | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` `` | Wróć do panelu plików | | + +## Panel główny (zatwierdzanie) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Idź do poprzedniego fragmentu | | +| `` `` | Idź do następnego fragmentu | | +| `` v `` | Przełącz zaznaczenie zakresu | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | Kopiuj zaznaczony tekst do schowka | | +| `` `` | Zatwierdź | Przełącz zaznaczenie zatwierdzone/niezatwierdzone. | +| `` d `` | Odrzuć | Gdy zaznaczona jest niezatwierdzona zmiana, odrzuć ją używając `git reset`. Gdy zaznaczona jest zatwierdzona zmiana, cofnij zatwierdzenie. | +| `` o `` | Otwórz plik | Otwórz plik w domyślnej aplikacji. | +| `` e `` | Edytuj plik | Otwórz plik w zewnętrznym edytorze. | +| `` `` | Wróć do panelu plików | | +| `` `` | Przełącz widok | Przełącz na inny widok (zatwierdzone/niezatwierdzone zmiany). | +| `` E `` | Edytuj fragment | Edytuj wybrany fragment w zewnętrznym edytorze. | +| `` c `` | Commit | Zatwierdź zmiany zatwierdzone. | +| `` w `` | Zatwierdź zmiany bez hooka pre-commit | | +| `` C `` | Zatwierdź zmiany używając edytora git | | +| `` `` | Znajdź bazowy commit do poprawki | Znajdź commit, na którym opierają się Twoje obecne zmiany, w celu poprawienia/zmiany commita. To pozwala Ci uniknąć przeglądania commitów w Twojej gałęzi jeden po drugim, aby zobaczyć, który commit powinien być poprawiony/zmieniony. Zobacz dokumentację: | +| `` / `` | Szukaj w bieżącym widoku po tekście | | + +## Panel potwierdzenia + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Potwierdź | | +| `` `` | Zamknij/Anuluj | | +| `` `` | Kopiuj do schowka | | + +## Pliki + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopiuj ścieżkę do schowka | | +| `` `` | Zatwierdź | Przełącz zatwierdzenie dla wybranego pliku. | +| `` `` | Filtruj pliki według statusu | | +| `` y `` | Kopiuj do schowka | | +| `` c `` | Commit | Zatwierdź zmiany zatwierdzone. | +| `` w `` | Zatwierdź zmiany bez hooka pre-commit | | +| `` A `` | Popraw ostatni commit | | +| `` C `` | Zatwierdź zmiany używając edytora git | | +| `` `` | Znajdź bazowy commit do poprawki | Znajdź commit, na którym opierają się Twoje obecne zmiany, w celu poprawienia/zmiany commita. To pozwala Ci uniknąć przeglądania commitów w Twojej gałęzi jeden po drugim, aby zobaczyć, który commit powinien być poprawiony/zmieniony. Zobacz dokumentację: | +| `` e `` | Edytuj | Otwórz plik w zewnętrznym edytorze. | +| `` o `` | Otwórz plik | Otwórz plik w domyślnej aplikacji. | +| `` i `` | Ignoruj lub wyklucz plik | | +| `` r `` | Odśwież pliki | | +| `` s `` | Schowaj | Schowaj wszystkie zmiany. Dla innych wariantów schowania, użyj klawisza wyświetlania opcji schowka. | +| `` S `` | Wyświetl opcje schowka | Wyświetl opcje schowka (np. schowaj wszystko, schowaj zatwierdzone, schowaj niezatwierdzone). | +| `` a `` | Zatwierdź wszystko | Przełącz zatwierdzenie/odznaczenie dla wszystkich plików w drzewie roboczym. | +| `` `` | Zatwierdź linie / Zwiń katalog | Jeśli wybrany element jest plikiem, skup się na widoku zatwierdzania, aby móc zatwierdzać poszczególne fragmenty/linie. Jeśli wybrany element jest katalogiem, zwiń/rozwiń go. | +| `` d `` | Odrzuć | Wyświetl opcje odrzucania zmian w wybranym pliku. | +| `` g `` | Pokaż opcje resetowania do upstream | | +| `` D `` | Reset | Wyświetl opcje resetu dla drzewa roboczego (np. zniszczenie drzewa roboczego). | +| `` ` `` | Przełącz widok drzewa plików | 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'. | +| `` `` | Otwórz zewnętrzne narzędzie różnic (git difftool) | | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` f `` | Pobierz | Pobierz zmiany ze zdalnego serwera. | +| `` - `` | Collapse all files | Collapse all directories in the files tree | +| `` = `` | Expand all files | Expand all directories in the file tree | +| `` 0 `` | Focus main view | | +| `` / `` | Szukaj w bieżącym widoku po tekście | | + +## Pliki commita + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopiuj ścieżkę do schowka | | +| `` y `` | Kopiuj do schowka | | +| `` c `` | Przełącz | Przełącz plik. Zastępuje plik w twoim drzewie roboczym wersją z wybranego commita. | +| `` d `` | Usuń | Odrzuć zmiany w tym pliku z tego commita. Uruchamia interaktywny rebase w tle, więc możesz otrzymać konflikt scalania, jeśli późniejszy commit również zmienia ten plik. | +| `` o `` | Otwórz plik | Otwórz plik w domyślnej aplikacji. | +| `` e `` | Edytuj | Otwórz plik w zewnętrznym edytorze. | +| `` `` | Otwórz zewnętrzne narzędzie różnic (git difftool) | | +| `` `` | Przełącz plik włączony w łatkę | Przełącz, czy plik jest włączony w niestandardową łatkę. Zobacz https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` a `` | Przełącz wszystkie pliki | Dodaj/usuń wszystkie pliki commita do niestandardowej łatki. Zobacz https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` `` | Wejdź do pliku / Przełącz zwiń katalog | Jeśli plik jest wybrany, wejdź do pliku, aby móc dodawać/usuwać poszczególne linie do niestandardowej łatki. Jeśli wybrany jest katalog, przełącz katalog. | +| `` ` `` | Przełącz widok drzewa plików | 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 | | +| `` / `` | Szukaj w bieżącym widoku po tekście | | + +## Podsumowanie commita + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Potwierdź | | +| `` `` | Zamknij | | + +## Reflog + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopiuj hash commita do schowka | | +| `` `` | Przełącz | Przełącz wybrany commit jako odłączoną HEAD. | +| `` y `` | Kopiuj atrybut commita do schowka | Kopiuj atrybut commita do schowka (np. hash, URL, różnice, wiadomość, autor). | +| `` o `` | Otwórz commit w przeglądarce | | +| `` n `` | Utwórz nową gałąź z commita | | +| `` 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 | Wyświetl opcje resetu (miękki/mieszany/twardy) do wybranego elementu. | +| `` C `` | Kopiuj (cherry-pick) | Oznacz commit jako skopiowany. Następnie, w widoku lokalnych commitów, możesz nacisnąć `V`, aby wkleić (cherry-pick) skopiowane commity do sprawdzonej gałęzi. W dowolnym momencie możesz nacisnąć ``, aby anulować zaznaczenie. | +| `` `` | Resetuj wybrane (cherry-picked) commity | | +| `` `` | Otwórz zewnętrzne narzędzie różnic (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Pokaż commity | | +| `` w `` | Zobacz opcje drzewa pracy | | +| `` / `` | Filtruj bieżący widok po tekście | | + +## Schowek + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Zastosuj | Zastosuj wpis schowka do katalogu roboczego. | +| `` g `` | Wyciągnij | Zastosuj wpis schowka do katalogu roboczego i usuń wpis schowka. | +| `` d `` | Usuń | Usuń wpis schowka z listy schowka. | +| `` n `` | Nowa gałąź | Utwórz nową gałąź z wybranego wpisu schowka. Działa poprzez przełączenie git na commit, na którym wpis schowka został utworzony, tworzenie nowej gałęzi z tego commita, a następnie zastosowanie wpisu schowka do nowej gałęzi jako dodatkowego commita. | +| `` r `` | Zmień nazwę schowka | | +| `` 0 `` | Focus main view | | +| `` `` | Wyświetl pliki | | +| `` w `` | Zobacz opcje drzewa pracy | | +| `` / `` | Filtruj bieżący widok po tekście | | + +## Status + +| Key | Action | Info | +|-----|--------|-------------| +| `` o `` | Otwórz plik konfiguracyjny | Otwórz plik w domyślnej aplikacji. | +| `` e `` | Edytuj plik konfiguracyjny | Otwórz plik w zewnętrznym edytorze. | +| `` u `` | Sprawdź aktualizacje | | +| `` `` | Przełącz na ostatnie repozytorium | | +| `` a `` | Show/cycle all branch logs | | +| `` 0 `` | Focus main view | | + +## Sub-commity + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopiuj hash commita do schowka | | +| `` `` | Przełącz | Przełącz wybrany commit jako odłączoną HEAD. | +| `` y `` | Kopiuj atrybut commita do schowka | Kopiuj atrybut commita do schowka (np. hash, URL, różnice, wiadomość, autor). | +| `` o `` | Otwórz commit w przeglądarce | | +| `` n `` | Utwórz nową gałąź z commita | | +| `` 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 | Wyświetl opcje resetu (miękki/mieszany/twardy) do wybranego elementu. | +| `` C `` | Kopiuj (cherry-pick) | Oznacz commit jako skopiowany. Następnie, w widoku lokalnych commitów, możesz nacisnąć `V`, aby wkleić (cherry-pick) skopiowane commity do sprawdzonej gałęzi. W dowolnym momencie możesz nacisnąć ``, aby anulować zaznaczenie. | +| `` `` | Resetuj wybrane (cherry-picked) commity | | +| `` `` | Otwórz zewnętrzne narzędzie różnic (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Wyświetl pliki | | +| `` w `` | Zobacz opcje drzewa pracy | | +| `` / `` | Szukaj w bieżącym widoku po tekście | | + +## Submoduły + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopiuj nazwę submodułu do schowka | | +| `` `` | Wejdź | Wejdź do submodułu. Po wejściu do submodułu możesz nacisnąć ``, aby wrócić do repozytorium nadrzędnego. | +| `` d `` | Usuń | Usuń wybrany submoduł i odpowiadający mu katalog. | +| `` u `` | Aktualizuj | Aktualizuj wybrany submoduł. | +| `` n `` | Nowy submoduł | | +| `` e `` | Zaktualizuj URL submodułu | | +| `` i `` | Zainicjuj | Zainicjuj wybrany submoduł, aby przygotować do pobrania. Prawdopodobnie chcesz to kontynuować, wywołując akcję 'update', aby pobrać submoduł. | +| `` b `` | Pokaż opcje masowych operacji na submodułach | | +| `` / `` | Filtruj bieżący widok po tekście | | + +## Tagi + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy tag to clipboard | | +| `` `` | Przełącz | Przełącz wybrany tag jako odłączoną głowę (detached HEAD). | +| `` n `` | Nowy tag | Utwórz nowy tag z bieżącego commita. Zostaniesz poproszony o wprowadzenie nazwy tagu i opcjonalnego opisu. | +| `` d `` | Usuń | Wyświetl opcje usuwania lokalnego/odległego tagu. | +| `` P `` | Wyślij tag | Wyślij wybrany tag do zdalnego. Zostaniesz poproszony o wybranie zdalnego. | +| `` g `` | Reset | Wyświetl opcje resetu (miękki/mieszany/twardy) do wybranego elementu. | +| `` `` | Otwórz zewnętrzne narzędzie różnic (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | Pokaż commity | | +| `` w `` | Zobacz opcje drzewa pracy | | +| `` / `` | Filtruj bieżący widok po tekście | | + +## Zdalne + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Wyświetl gałęzie | | +| `` n `` | Nowy zdalny | | +| `` d `` | Usuń | Usuń wybrany zdalny. Wszelkie lokalne gałęzie śledzące gałąź zdalną z tego zdalnego nie zostaną dotknięte. | +| `` e `` | Edytuj | Edytuj nazwę lub URL wybranego zdalnego. | +| `` f `` | Pobierz | Pobierz aktualizacje z zdalnego repozytorium. Pobiera nowe commity i gałęzie bez scalania ich z lokalnymi gałęziami. | +| `` / `` | Filtruj bieżący widok po tekście | | + +## Zdalne gałęzie + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Kopiuj nazwę gałęzi do schowka | | +| `` `` | Przełącz | Przełącz na nową lokalną gałąź na podstawie wybranej gałęzi zdalnej. Nowa gałąź będzie śledzić gałąź zdalną. | +| `` n `` | Nowa gałąź | | +| `` M `` | Scal | Scal wybraną gałąź z aktualnie sprawdzoną gałęzią. | +| `` r `` | Przebazuj | Przebazuj przełączoną gałąź na wybraną gałąź. | +| `` d `` | Usuń | Usuń gałąź zdalną ze zdalnego. | +| `` u `` | Ustaw jako upstream | Ustaw wybraną gałąź zdalną jako upstream sprawdzonej gałęzi. | +| `` s `` | Kolejność sortowania | | +| `` g `` | Reset | Wyświetl opcje resetu (miękki/mieszany/twardy) do wybranego elementu. | +| `` `` | Otwórz zewnętrzne narzędzie różnic (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | Pokaż commity | | +| `` w `` | Zobacz opcje drzewa pracy | | +| `` / `` | Filtruj bieżący widok po tekście | | diff --git a/docs-master/keybindings/Keybindings_pt.md b/docs-master/keybindings/Keybindings_pt.md new file mode 100644 index 00000000000..4da1b2d7264 --- /dev/null +++ b/docs-master/keybindings/Keybindings_pt.md @@ -0,0 +1,413 @@ +_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 Keybindings + +_Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ + +## Combinações globais de teclas + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Mudar para um repositório recente | | +| `` (fn+up/shift+k) `` | Rolar janela principal para cima | | +| `` (fn+down/shift+j) `` | Rolar a janela principal para baixo | | +| `` @ `` | View command log options | View options for the command log e.g. show/hide the command log and focus the command log. | +| `` P `` | Empurre (Push) | Faça push do branch atual para o seu branch upstream. Se nenhum upstream estiver configurado, você será solicitado a configurar um branch a montante. | +| `` p `` | Puxar (Pull) | Puxe alterações do controle remoto para o ramo atual. Se nenhum upstream estiver configurado, será solicitado configurar um ramo a montante. | +| `` ) `` | 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'. | +| `` : `` | Executar comando da shell | Traga um prompt onde você pode digitar um comando shell para executar. | +| `` `` | Ver opções de patch personalizadas | | +| `` m `` | Ver opções de mesclar/rebase | Ver opções para abortar/continuar/pular o merge/rebase atual. | +| `` R `` | Atualizar | Atualize o estado do git (ou seja, execute `git status`, `git branch`, etc em segundo plano para atualizar o conteúdo de painéis). Isso não executa `git fetch`. | +| `` + `` | Next screen mode (normal/half/fullscreen) | | +| `` _ `` | Prev screen mode | | +| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers | +| `` `` | Cancelar | | +| `` ? `` | 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 `` | Sair | | +| `` `` | 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 `` | Desfazer | O reflog será usado para determinar qual comando git para executar para desfazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. | +| `` Z `` | Refazer | O reflog será usado para determinar qual comando git para executar para refazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. | + +## List panel navigation + +| Key | Action | Info | +|-----|--------|-------------| +| `` , `` | Previous page | | +| `` . `` | Next page | | +| `` < () `` | Scroll to top | | +| `` > () `` | Scroll to bottom | | +| `` v `` | Toggle range select | | +| `` `` | Range select down | | +| `` `` | Range select up | | +| `` / `` | Search the current view by text | | +| `` H `` | Rolar à esquerda | | +| `` L `` | Scroll para a direita | | +| `` ] `` | Next tab | | +| `` [ `` | Previous tab | | + +## Arquivos + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy path to clipboard | | +| `` `` | Etapa | Alternar para staging para o arquivo selecionado. | +| `` `` | Filtrar arquivos por status | | +| `` y `` | Copy to clipboard | | +| `` c `` | Commit | Submeter mudanças em staging | +| `` w `` | Fazer commit de alterações sem pré-commit | | +| `` A `` | Alterar último commit | | +| `` C `` | Enviar alteração usando um editor Git | | +| `` `` | Encontrar commit da base para consertar | Encontre o commit em que as suas mudanças atuais estão se baseando, para alterar/consertar o commit. Isso poupa-te você de ter que olhar pelos commits da sua branch um por um para ver qual commit deve ser alterado/consertado
Veja a documentação:
| +| `` e `` | Editar | Abrir arquivo no editor externo. | +| `` o `` | Abrir arquivo | Abrir arquivo no aplicativo padrão. | +| `` i `` | Ignore or exclude file | | +| `` r `` | Atualizar arquivos | | +| `` s `` | Stash | Stash todas as alterações. Para outras variações de armazenamento, use a fixação de teclas de armazenamento. | +| `` S `` | Ver opções de stash | Ver opções de stash (por exemplo, trash all, stash staged, stash unsttued). | +| `` a `` | Stage completo | Alternar para todos os arquivos na árvore de trabalho | +| `` `` | Stage lines / Colapso diretório | Se o item selecionado for um arquivo, o foco na exibição de preparo para o estágio de cenas/linhas individuais. Se o item selecionado for um diretório, recolher/expandi-lo. | +| `` d `` | Descartar | Exibir opções para descartar alterações para o arquivo selecionado. | +| `` g `` | View upstream reset options | | +| `` D `` | Restaurar | Opções de redefinição de exibição para árvore de trabalho (por exemplo, nukando a árvore de trabalho). | +| `` ` `` | Alternar exibição de árvore de arquivo | 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'. | +| `` `` | Abrir ferramenta de diff externa (git difftool) | | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` f `` | Buscar | Buscar alterações do controle remoto. | +| `` - `` | Recolher todos os arquivos | Recolher todos os diretórios na árvore de arquivos | +| `` = `` | Expandir todos os arquivos | Expandir todos os diretórios na árvore do arquivo | +| `` 0 `` | Focus main view | | +| `` / `` | Search the current view by text | | + +## Branches locais + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy branch name to clipboard | | +| `` i `` | Exibir opções do git-flow | | +| `` `` | Verificar | Checar item selecionado | +| `` n `` | Nova branch | | +| `` N `` | Mover commits para uma nova 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 | | +| `` `` | Copiar URL do pull request para área de transferência | | +| `` c `` | Checar por nome | Checar por nome. Na caixa de entrada você pode inserir '-' para trocar para a última branch | +| `` - `` | Checkout da branch anterior | | +| `` F `` | Forçar checagem | Forçar checagem da branch selecionada. Isso irá descartar todas as mudanças no seu diretório de trabalho antes cheque a branch selecionada | +| `` d `` | Apagar | Ver opções de exclusão para a branch local/remoto. | +| `` r `` | Refazer | Refazer a branch checada na branch selecionada | +| `` M `` | Mesclar | Ver opções para mesclar o item selecionado no branch atual (mesclar regularmente, mesclar squash) | +| `` f `` | Avanço rápido | Encaminhamento rápido de branch selecionada a partir do upstream. | +| `` T `` | New tag | | +| `` s `` | Sort order | | +| `` g `` | Restaurar | | +| `` 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. | +| `` `` | Abrir ferramenta de diff externa (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | View commits | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Branches remotos + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy branch name to clipboard | | +| `` `` | Verificar | Checar a nova branch baseada na brach remota selecionada, ou a branch remota como HEAD, desanexado | +| `` n `` | Nova branch | | +| `` M `` | Mesclar | Ver opções para mesclar o item selecionado no branch atual (mesclar regularmente, mesclar squash) | +| `` r `` | Refazer | Refazer a branch checada na branch selecionada | +| `` d `` | Apagar | Excluir o branch remoto do controle remoto. | +| `` u `` | Definir como upstream | Definir o ramo remoto selecionado como fluxo do branch check-out. | +| `` s `` | Sort order | | +| `` g `` | Restaurar | Ver opções de redefinição (soft/mixed/hard) para redefinir para o item selecionado. | +| `` `` | Abrir ferramenta de diff externa (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | View commits | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Commit arquivos + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy path to clipboard | | +| `` y `` | Copy to clipboard | | +| `` c `` | Verificar | Arquivo de check-out. Isso substitui o arquivo em sua árvore de trabalho com a versão do commit selecionado. | +| `` d `` | Remover | Descartar as alterações desse commit para este arquivo. Isso executa uma rebase interativa em segundo plano, então você pode ter um conflito de merge se um commit posterior também alterar este arquivo. | +| `` o `` | Abrir arquivo | Abrir arquivo no aplicativo padrão. | +| `` e `` | Editar | Abrir arquivo no editor externo. | +| `` `` | Abrir ferramenta de diff externa (git difftool) | | +| `` `` | Alternar entre o arquivo incluído no patch | Alternar se o arquivo está incluído no patch personalizado. Veja https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` a `` | Alternar todos os arquivos | Adicionar/remover todos os arquivos de commit para atualização personalizada. Consulte https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` `` | Insira o arquivo / Alternar diretório recolhido | Se um arquivo estiver selecionado, insira o arquivo para que você possa adicionar/remover linhas individuais no patch personalizado. Se um diretório for selecionado, ative o diretório. | +| `` ` `` | Alternar exibição de árvore de arquivo | 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'. | +| `` - `` | Recolher todos os arquivos | Recolher todos os diretórios na árvore de arquivos | +| `` = `` | Expandir todos os arquivos | Expandir todos os diretórios na árvore do arquivo | +| `` 0 `` | Focus main view | | +| `` / `` | Search the current view by text | | + +## Commits + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy commit hash to clipboard | | +| `` `` | Reset copied (cherry-picked) commits selection | | +| `` b `` | View bisect options | | +| `` s `` | Squash | Squash o commit selecionado no commit abaixo dele. A mensagem do commit selecionado será anexada ao commit abaixo dele. | +| `` f `` | Fixup | Faça o commit selecionado no commit abaixo dele. Semelhante para o squash, mas a mensagem do commit selecionado será descartada. | +| `` r `` | Reword | Repetir a mensagem de submissão selecionada. | +| `` R `` | Republicar com o editor | | +| `` d `` | Descartar | Solte o commit selecionado. Isso irá remover o commit do branch através de uma rebase. Se o commit faz com que as alterações em commits posteriores dependem, você pode precisar resolver conflitos de merge. | +| `` e `` | Editar (iniciar rebase interativa) | Editar o commit selecionado. Use isto para iniciar uma rebase interativa a partir do commit selecionado. Quando já estiver no meio da reconstrução, isto irá marcar o commit selecionado para edição, o que significa que ao continuar com a reformulação. a rebase irá pausar no commit selecionado para permitir que você faça alterações. | +| `` 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 `` | Escolher | Marque o commit selecionado para ser escolhido (quando meados da base). Isso significa que o commit será mantido ao continuar o rebase. | +| `` F `` | Criar commit de correção | Crie o commit 'correção!' para o commit selecionado. Mais tarde, você pode pressionar `S` neste mesmo commit para aplicar todas os commits de correção acima. | +| `` S `` | Aplicar commits de correções | Aplicar Squash all 'correção!', seja acima do commit selecionado, ou tudo no branch atual (autosquash). | +| `` `` | Mover commit um para baixo | | +| `` `` | Mover o commit um para cima | | +| `` V `` | Colar (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 `` | Modificar | Alterar o commit com mudanças em sted. Se o commit selecionado for o commit HEAD, ele executará o `git commit --amend`. Caso contrário, o compromisso será alterado por meio de uma base de apoio. | +| `` a `` | Alterar atributo de commit | Definir/Redefinir autor de submissão ou co-autor definido. | +| `` t `` | Reverter | Crie um commit reverter para o commit selecionado, que aplica as alterações do commit selecionado em reverso. | +| `` T `` | Tag commit | Create a new tag pointing at the selected commit. You'll be prompted to enter a tag name and optional description. | +| `` `` | View log options | View options for commit log e.g. changing sort order, hiding the git graph, showing the whole git graph. | +| `` `` | Verificar | Checkout the selected commit as a detached HEAD. | +| `` 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 `` | Mover commits para uma nova 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 `` | Restaurar | Ver opções de redefinição (soft/mixed/hard) para redefinir para o item selecionado. | +| `` C `` | Copiar (cherry-pick) | Marcar commit como copiado. Então, dentro da visualização local de commits, você pode pressionar `V` para colar (cherry-pick) o(s) commit(s) copiado(s) em seu branch de check-out. A qualquer momento você pode pressionar `` para cancelar a seleção. | +| `` `` | Abrir ferramenta de diff externa (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Ver arquivos | | +| `` w `` | View worktree options | | +| `` / `` | Search the current view by text | | + +## Confirmation panel + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Confirmar | | +| `` `` | Fechar/Cancelar | | +| `` `` | Copy to clipboard | | + +## Etiquetas + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy tag to clipboard | | +| `` `` | Verificar | Checar a tag selecionada como um HEAD, desanexado | +| `` n `` | New tag | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | +| `` d `` | Apagar | Ver opções de exclusão para tag local/remoto. | +| `` P `` | Push tag | Push the selected tag to a remote. You'll be prompted to select a remote. | +| `` g `` | Restaurar | Ver opções de redefinição (soft/mixed/hard) para redefinir para o item selecionado. | +| `` `` | Abrir ferramenta de diff externa (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | View commits | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Input prompt + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Confirmar | | +| `` `` | Fechar/Cancelar | | + +## Menu + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Executar | | +| `` `` | Fechar/Cancelar | | +| `` / `` | Filter the current view by text | | + +## Painel Principal (Normal) + +| Key | Action | Info | +|-----|--------|-------------| +| `` mouse wheel down (fn+up) `` | Rolar para baixo | | +| `` mouse wheel up (fn+down) `` | Rolar para cima | | +| `` `` | Mudar de visão | Alternar para outra visão (staged/não processadas alterações). | +| `` `` | Exit back to side panel | | +| `` / `` | Search the current view by text | | + +## Painel Principal (preparação) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Ir para o local anterior | | +| `` `` | Ir para o próximo trecho | | +| `` v `` | Toggle range select | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | Copy selected text to clipboard | | +| `` `` | Etapa | Ativar/desativar seleção em staged/unstaged | +| `` d `` | Descartar | Quando a mudança não desejada for selecionada, descarte a mudança usando `git reset`. Quando a mudança em fase é selecionada, despare a mudança. | +| `` o `` | Abrir arquivo | Abrir arquivo no aplicativo padrão. | +| `` e `` | Editar arquivo | Abrir arquivo no editor externo. | +| `` `` | Retornar ao painel de arquivos | | +| `` `` | Mudar de visão | Alternar para outra visão (staged/não processadas alterações). | +| `` E `` | Editar hunk | Editar o local selecionado no editor externo. | +| `` c `` | Commit | Submeter mudanças em staging | +| `` w `` | Fazer commit de alterações sem pré-commit | | +| `` C `` | Enviar alteração usando um editor Git | | +| `` `` | Encontrar commit da base para consertar | Encontre o commit em que as suas mudanças atuais estão se baseando, para alterar/consertar o commit. Isso poupa-te você de ter que olhar pelos commits da sua branch um por um para ver qual commit deve ser alterado/consertado
Veja a documentação:
| +| `` / `` | Search the current view by text | | + +## Painel principal (mesclagem) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Escolha o local | | +| `` b `` | Pegar todos os pedaços | | +| `` `` | Trecho anterior | | +| `` `` | Próximo trecho | | +| `` `` | Conflito anterior | | +| `` `` | Próximo conflito | | +| `` z `` | Desfazer | Desfazer resolução de conflitos de última mesclagem. | +| `` e `` | Editar arquivo | Abrir arquivo no editor externo. | +| `` o `` | Abrir arquivo | Abrir arquivo no aplicativo padrão. | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` `` | Retornar ao painel de arquivos | | + +## Painel principal (patch build) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Ir para o local anterior | | +| `` `` | Ir para o próximo trecho | | +| `` v `` | Toggle range select | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | Copy selected text to clipboard | | +| `` o `` | Abrir arquivo | Abrir arquivo no aplicativo padrão. | +| `` e `` | Editar arquivo | Abrir arquivo no editor externo. | +| `` `` | Alternar linhas no caminho | | +| `` `` | Sair do construtor de patch personalizado | | +| `` / `` | Search the current view by text | | + +## Reflog + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy commit hash to clipboard | | +| `` `` | Verificar | Checkout the selected commit as a detached HEAD. | +| `` 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 `` | Mover commits para uma nova 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 `` | Restaurar | Ver opções de redefinição (soft/mixed/hard) para redefinir para o item selecionado. | +| `` C `` | Copiar (cherry-pick) | Marcar commit como copiado. Então, dentro da visualização local de commits, você pode pressionar `V` para colar (cherry-pick) o(s) commit(s) copiado(s) em seu branch de check-out. A qualquer momento você pode pressionar `` para cancelar a seleção. | +| `` `` | Reset copied (cherry-picked) commits selection | | +| `` `` | Abrir ferramenta de diff externa (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | View commits | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Remotes + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Ver branches | | +| `` n `` | Novo controle | | +| `` d `` | Remover | Remover o controle remoto. Quaisquer ramificações locais de rastreamento de um ramo remoto do controle não serão afetadas. | +| `` e `` | Editar | Edit the selected remote's name or URL. | +| `` f `` | Buscar | 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 | | + +## Secundário + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Mudar de visão | Alternar para outra visão (staged/não processadas alterações). | +| `` `` | Exit back to side panel | | +| `` / `` | Search the current view by text | | + +## Stash + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Aplicar | Aplique o stash no seu diretório de trabalho. | +| `` g `` | Pop | Aplique a entrada de stash no seu diretório de trabalho e remova a entrada de stash. | +| `` d `` | Descartar | Remova a entrada do stash da lista de armazenamento. | +| `` n `` | Nova branch | Criar um novo ramo a partir da entrada de lixo selecionada. Isso funciona verificando o commit do qual a entrada de lixo foi criada, criar um novo branch a partir desse commit e, em seguida, aplicar a entrada de lixo ao novo branch como um commit adicional. | +| `` r `` | Renomear o stasj | | +| `` 0 `` | Focus main view | | +| `` `` | Ver arquivos | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Status + +| Key | Action | Info | +|-----|--------|-------------| +| `` o `` | Abrir o ficheiro de config | Abrir arquivo no aplicativo padrão. | +| `` e `` | Editar arquivo de configuração | Abrir arquivo no editor externo. | +| `` u `` | Verificar atualização | | +| `` `` | Mudar para um repositório recente | | +| `` a `` | Mostrar/ciclo todos os logs de filiais | | +| `` 0 `` | Focus main view | | + +## Sub-commits + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy commit hash to clipboard | | +| `` `` | Verificar | Checkout the selected commit as a detached HEAD. | +| `` 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 `` | Mover commits para uma nova 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 `` | Restaurar | Ver opções de redefinição (soft/mixed/hard) para redefinir para o item selecionado. | +| `` C `` | Copiar (cherry-pick) | Marcar commit como copiado. Então, dentro da visualização local de commits, você pode pressionar `V` para colar (cherry-pick) o(s) commit(s) copiado(s) em seu branch de check-out. A qualquer momento você pode pressionar `` para cancelar a seleção. | +| `` `` | Reset copied (cherry-picked) commits selection | | +| `` `` | Abrir ferramenta de diff externa (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Ver arquivos | | +| `` w `` | View worktree options | | +| `` / `` | Search the current view by text | | + +## Submodules + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy submodule name to clipboard | | +| `` `` | Enter | Enter submodule. After entering the submodule, you can press `` to escape back to the parent repo. | +| `` d `` | Remover | Remove the selected submodule and its corresponding directory. | +| `` u `` | Update | Update selected submodule. | +| `` n `` | New submodule | | +| `` e `` | Update submodule URL | | +| `` i `` | Initialize | Initialize the selected submodule to prepare for fetching. You probably want to follow this up by invoking the 'update' action to fetch the submodule. | +| `` b `` | View bulk submodule options | | +| `` / `` | Filter the current view by text | | + +## Sumário do commit + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Confirmar | | +| `` `` | Fechar | | + +## Worktrees + +| Key | Action | Info | +|-----|--------|-------------| +| `` n `` | New worktree | | +| `` `` | Switch | Switch to the selected worktree. | +| `` o `` | Abrir no editor | | +| `` d `` | Remover | 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 | | diff --git a/docs-master/keybindings/Keybindings_ru.md b/docs-master/keybindings/Keybindings_ru.md new file mode 100644 index 00000000000..7b0aa79e298 --- /dev/null +++ b/docs-master/keybindings/Keybindings_ru.md @@ -0,0 +1,413 @@ +_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 Связки клавиш + +_Связки клавиш_ + +## Глобальные сочетания клавиш + +| 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 the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. | +| `` p `` | Получить и слить изменения | 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.

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 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'. | +| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. | +| `` `` | Просмотреть пользовательские параметры патча | | +| `` m `` | Просмотреть параметры слияния/перебазирования | 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`. | +| `` + `` | Следующий режим экрана (нормальный/полуэкранный/полноэкранный) | | +| `` _ `` | Предыдущий режим экрана | | +| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers | +| `` `` | Отменить | | +| `` ? `` | Открыть меню | | +| `` `` | Просмотреть параметры фильтрации по пути | 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 `` | Выйти | | +| `` `` | 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 `` | Отменить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git запустить, чтобы отменить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. | +| `` Z `` | Повторить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git нужно запустить, чтобы повторить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. | + +## Навигация по панели списка + +| Key | Action | Info | +|-----|--------|-------------| +| `` , `` | Предыдущая страница | | +| `` . `` | Следующая страница | | +| `` < () `` | Пролистать наверх | | +| `` > () `` | Прокрутить вниз | | +| `` v `` | Переключить выборку перетаскивания | | +| `` `` | Range select down | | +| `` `` | Range select up | | +| `` / `` | Найти | | +| `` H `` | Прокрутить влево | | +| `` L `` | Прокрутить вправо | | +| `` ] `` | Следующая вкладка | | +| `` [ `` | Предыдущая вкладка | | + +## Input prompt + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Подтвердить | | +| `` `` | Закрыть/отменить | | + +## 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 | +|-----|--------|-------------| +| `` `` | Переключиться на другую панель (проиндексированные/непроиндексированные изменения) | Switch to other view (staged/unstaged changes). | +| `` `` | Exit back to side panel | | +| `` / `` | Найти | | + +## Главная панель (Индексирование) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Выбрать предыдущую часть | | +| `` `` | Выбрать следующую часть | | +| `` v `` | Переключить выборку перетаскивания | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. 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 selected hunk in external editor. | +| `` c `` | Сохранить изменения | Commit staged changes. | +| `` w `` | Закоммитить изменения без предварительного хука коммита | | +| `` 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: | +| `` / `` | Найти | | + +## Главная панель (Обычный) + +| Key | Action | Info | +|-----|--------|-------------| +| `` mouse wheel down (fn+up) `` | Прокрутить вниз | | +| `` mouse wheel up (fn+down) `` | Прокрутить вверх | | +| `` `` | Переключиться на другую панель (проиндексированные/непроиндексированные изменения) | Switch to other view (staged/unstaged changes). | +| `` `` | Exit back to side panel | | +| `` / `` | Найти | | + +## Главная панель (Слияние) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Выбрать эту часть | | +| `` b `` | Выбрать все части | | +| `` `` | Выбрать предыдущую часть | | +| `` `` | Выбрать следующую часть | | +| `` `` | Выбрать предыдущий конфликт | | +| `` `` | Выбрать следующий конфликт | | +| `` z `` | Отменить | Undo last merge conflict resolution. | +| `` e `` | Редактировать файл | Open file in external editor. | +| `` o `` | Открыть файл | Open file in default application. | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` `` | Вернуться к панели файлов | | + +## Главная панель (сборка патчей) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Выбрать предыдущую часть | | +| `` `` | Выбрать следующую часть | | +| `` v `` | Переключить выборку перетаскивания | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | Скопировать выделенный текст в буфер обмена | | +| `` o `` | Открыть файл | Open file in default application. | +| `` e `` | Редактировать файл | Open file in external editor. | +| `` `` | Добавить/удалить строку(и) для патча | | +| `` `` | Выйти из сборщика пользовательских патчей | | +| `` / `` | Найти | | + +## Журнал ссылок (Reflog) + +| 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 `` | Создать новую ветку с этого коммита | | +| `` 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 `` | Просмотреть параметры сброса | 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. | +| `` `` | Сбросить отобранную (скопированную \| cherry-picked) выборку коммитов | | +| `` `` | Open external diff tool (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Просмотреть коммиты | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Коммиты + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Скопировать hash коммита в буфер обмена | | +| `` `` | Сбросить отобранную (скопированную \| cherry-picked) выборку коммитов | | +| `` b `` | Просмотреть параметры бинарного поиска | | +| `` 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 | Выбрать коммит (в середине перебазирования) | +| `` F `` | Создать fixup коммит | Создать fixup коммит для этого коммита | +| `` S `` | Apply fixup commits | Объединить все 'fixup!' коммиты выше в выбранный коммит (автосохранение) | +| `` `` | Переместить коммит вниз на один | | +| `` `` | Переместить коммит вверх на один | | +| `` 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 | Править последний коммит с проиндексированными изменениями | +| `` a `` | Установить/убрать автора коммита | 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). | +| `` o `` | Открыть коммит в браузере | | +| `` n `` | Создать новую ветку с этого коммита | | +| `` 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 `` | Просмотреть параметры сброса | 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) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Просмотреть файлы выбранного элемента | | +| `` w `` | View worktree options | | +| `` / `` | Найти | | + +## Локальные Ветки + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Скопировать название ветки в буфер обмена | | +| `` i `` | Показать параметры git-flow | | +| `` `` | Переключить | Checkout selected item. | +| `` n `` | Новая ветка | | +| `` 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 `` | Создать запрос на принятие изменений | | +| `` O `` | Создать параметры запроса принятие изменений | | +| `` `` | Скопировать URL запроса на принятие изменений в буфер обмена | | +| `` c `` | Переключить по названию | Checkout by name. In the input box you can enter '-' to switch to the previous branch. | +| `` - `` | Checkout previous branch | | +| `` F `` | Принудительное переключение | 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 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 `` | Перемотать эту ветку вперёд из её upstream-ветки | Fast-forward selected branch from its upstream. | +| `` T `` | Создать тег | | +| `` s `` | Порядок сортировки | | +| `` g `` | Просмотреть параметры сброса | | +| `` 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) | | +| `` 0 `` | Focus main view | | +| `` `` | Просмотреть коммиты | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Меню + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Выполнить | | +| `` `` | Закрыть/отменить | | +| `` / `` | Filter the current view by text | | + +## Панель Подтверждения + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Подтвердить | | +| `` `` | Закрыть/отменить | | +| `` `` | Copy to clipboard | | + +## Подкоммиты + +| 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 `` | Создать новую ветку с этого коммита | | +| `` 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 `` | Просмотреть параметры сброса | 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. | +| `` `` | Сбросить отобранную (скопированную \| cherry-picked) выборку коммитов | | +| `` `` | Open external diff tool (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | Просмотреть файлы выбранного элемента | | +| `` w `` | View worktree options | | +| `` / `` | Найти | | + +## Подмодули + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Скопировать название подмодуля в буфер обмена | | +| `` `` | Enter | Ввести подмодуль | +| `` d `` | Remove | Remove the selected submodule and its corresponding directory. | +| `` u `` | Update | Обновить подмодуль | +| `` n `` | Добавить новый подмодуль | | +| `` e `` | Обновить URL подмодуля | | +| `` i `` | Initialize | Инициализировать подмодуль | +| `` b `` | Просмотреть параметры массового подмодуля | | +| `` / `` | Filter the current view by text | | + +## Сводка коммита + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Подтвердить | | +| `` `` | Закрыть | | + +## Сохранить Изменения Файлов + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Скопировать название файла в буфер обмена | | +| `` y `` | Copy to clipboard | | +| `` c `` | Переключить | Переключить файл | +| `` d `` | Remove | Отменить изменения коммита в этом файле | +| `` o `` | Открыть файл | Open file in default application. | +| `` e `` | Edit | Open file in external editor. | +| `` `` | Open external diff tool (git difftool) | | +| `` `` | Переключить файлы включённые в патч | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` a `` | Переключить все файлы, включённые в патч | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` `` | Введите файл, чтобы добавить выбранные строки в патч (или свернуть каталог переключения) | 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.

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 | | +| `` / `` | Найти | | + +## Статус + +| Key | Action | Info | +|-----|--------|-------------| +| `` o `` | Открыть файл конфигурации | Open file in default application. | +| `` e `` | Редактировать файл конфигурации | Open file in external editor. | +| `` u `` | Проверить обновления | | +| `` `` | Переключиться на последний репозиторий | | +| `` a `` | Show/cycle all branch logs | | +| `` 0 `` | Focus main view | | + +## Теги + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy tag to clipboard | | +| `` `` | Переключить | Checkout the selected 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 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 | | +| `` `` | Просмотреть коммиты | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Удалённые ветки + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Скопировать название ветки в буфер обмена | | +| `` `` | Переключить | Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head. | +| `` n `` | Новая ветка | | +| `` M `` | Слияние с текущей переключённой веткой | View options for merging the selected item into the current branch (regular merge, squash merge) | +| `` r `` | Перебазировать переключённую ветку на эту ветку | Rebase the checked-out branch onto the selected branch. | +| `` d `` | Delete | Delete the remote branch from the remote. | +| `` u `` | Set as upstream | Установить как upstream-ветку переключённую ветку | +| `` s `` | Порядок сортировки | | +| `` g `` | Просмотреть параметры сброса | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` `` | Open external diff tool (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | Просмотреть коммиты | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | + +## Удалённые репозитории + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | View branches | | +| `` n `` | Добавить новую удалённую ветку | | +| `` d `` | Remove | Remove the selected remote. Any local branches tracking a remote branch from the remote will be unaffected. | +| `` e `` | Edit | Редактировать удалённый репозитории | +| `` f `` | Получить изменения | Получение изменения из удалённого репозитория | +| `` / `` | Filter the current view by text | | + +## Файлы + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Скопировать название файла в буфер обмена | | +| `` `` | Переключить индекс | Toggle staged for selected file. | +| `` `` | Фильтровать файлы (проиндексированные/непроиндексированные) | | +| `` y `` | Copy to clipboard | | +| `` c `` | Сохранить изменения | Commit staged changes. | +| `` w `` | Закоммитить изменения без предварительного хука коммита | | +| `` A `` | Правка последнего коммита | | +| `` 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 `` | Игнорировать или исключить файл | | +| `` r `` | Обновить файлы | | +| `` s `` | Stash | Stash all changes. For other variations of stashing, use the view stash options keybinding. | +| `` S `` | Просмотреть параметры хранилища | View stash options (e.g. stash all, stash staged, stash unstaged). | +| `` a `` | Все проиндексированные/непроиндексированные | Toggle staged/unstaged for all files in working tree. | +| `` `` | Проиндексировать отдельные части/строки для файла или свернуть/развернуть для каталога | 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 `` | Просмотреть параметры «отмены изменении» | View options for discarding changes to the selected file. | +| `` g `` | Просмотреть параметры сброса upstream-ветки | | +| `` 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.

The default can be changed in the config file with the key 'gui.showFileTree'. | +| `` `` | Open external diff tool (git difftool) | | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` f `` | Получить изменения | 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 | | +| `` / `` | Найти | | + +## Хранилище + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Применить припрятанные изменения | Apply the stash entry to your working directory. | +| `` g `` | Применить припрятанные изменения и тут же удалить их из хранилища | Apply the stash entry to your working directory and remove the stash entry. | +| `` d `` | Удалить припрятанные изменения из хранилища | 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 `` | Переименовать хранилище | | +| `` 0 `` | Focus main view | | +| `` `` | Просмотреть файлы выбранного элемента | | +| `` w `` | View worktree options | | +| `` / `` | Filter the current view by text | | diff --git a/docs-master/keybindings/Keybindings_zh-CN.md b/docs-master/keybindings/Keybindings_zh-CN.md new file mode 100644 index 00000000000..57346740d53 --- /dev/null +++ b/docs-master/keybindings/Keybindings_zh-CN.md @@ -0,0 +1,413 @@ +_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 按键绑定 + +_图例:`` 意味着ctrl+b, `意味着Alt+b, `B` 意味着shift+b_ + +## 全局键绑定 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 切换到最近的仓库 | | +| `` (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'. | +| `` : `` | 执行 Shell 命令 | 调出可输入shell命令执行的提示符。 | +| `` `` | 查看自定义补丁选项 | | +| `` m `` | 查看合并/变基选项 | 查看当前合并或变基的中止、继续、跳过选项 | +| `` R `` | 刷新 | 刷新git状态(即在后台上运行`git status`,`git branch`等命令以更新面板内容) 不会运行`git fetch` | +| `` + `` | 下一屏模式(正常/半屏/全屏) | | +| `` _ `` | 上一屏模式 | | +| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers | +| `` `` | 取消 | | +| `` ? `` | 打开菜单 | | +| `` `` | 查看按路径过滤选项 | 查看用于过滤提交日志的选项,以便仅显示与过滤器匹配的提交。 | +| `` W `` | 打开 diff 菜单 | 查看与比较两个引用相关的选项,例如与选定的 ref 进行比较,输入要比较的 ref,然后反转比较方向。 | +| `` `` | 打开 diff 菜单 | 查看与比较两个引用相关的选项,例如与选定的 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 `` | 撤销 | Reflog将用于确定运行哪个git命令来撤消最后一个git命令。这并不包括对工作树的更改,只考虑提交。 | +| `` Z `` | 重做 | Reflog将用于确定运行哪个git命令来重做上一个git命令。这并不包括对工作树的更改,只考虑提交。 | + +## 列表面板导航 + +| Key | Action | Info | +|-----|--------|-------------| +| `` , `` | 上一页 | | +| `` . `` | 下一页 | | +| `` < () `` | 滚动到顶部 | | +| `` > () `` | 滚动到底部 | | +| `` v `` | 切换拖动选择 | | +| `` `` | 向下扩展选择范围 | | +| `` `` | 向上扩展选择范围 | | +| `` / `` | 开始搜索 | | +| `` H `` | 向左滚动 | | +| `` L `` | 向右滚动 | | +| `` ] `` | 下一个标签 | | +| `` [ `` | 上一个标签 | | + +## Input prompt + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 确认 | | +| `` `` | 关闭 | | + +## Reflog + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 复制提交哈希到剪贴板 | | +| `` `` | 检出 | 检出所选择的提交作为分离HEAD。 | +| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 | +| `` o `` | 在浏览器中打开提交 | | +| `` n `` | 从提交创建新分支 | | +| `` 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 `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 | +| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `` 来取消选择。 | +| `` `` | 重置已拣选(复制)的提交 | | +| `` `` | 使用外部差异比较工具(git difftool) | | +| `` * `` | 选择当前分支的提交 | | +| `` 0 `` | Focus main view | | +| `` `` | 查看提交 | | +| `` w `` | 查看工作区选项 | | +| `` / `` | 通过文本过滤当前视图 | | + +## 子提交 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 复制提交哈希到剪贴板 | | +| `` `` | 检出 | 检出所选择的提交作为分离HEAD。 | +| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 | +| `` o `` | 在浏览器中打开提交 | | +| `` n `` | 从提交创建新分支 | | +| `` 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 `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 | +| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `` 来取消选择。 | +| `` `` | 重置已拣选(复制)的提交 | | +| `` `` | 使用外部差异比较工具(git difftool) | | +| `` * `` | 选择当前分支的提交 | | +| `` 0 `` | Focus main view | | +| `` `` | 查看提交的文件 | | +| `` w `` | 查看工作区选项 | | +| `` / `` | 开始搜索 | | + +## 子模块 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 复制子模块名称到剪贴板 | | +| `` `` | 进入 | 输入子模块 | +| `` d `` | 删除 | 删除选定的子模块及其相应的目录 | +| `` u `` | 更新 | 更新子模块 | +| `` n `` | 添加新的子模块 | | +| `` e `` | 更新子模块 URL | | +| `` i `` | 初始化 | 初始化子模块 | +| `` b `` | 查看批量子模块选项 | | +| `` / `` | 通过文本过滤当前视图 | | + +## 工作区 + +| Key | Action | Info | +|-----|--------|-------------| +| `` n `` | 新建工作树 | | +| `` `` | 切换 | 切换到选中的工作树 | +| `` o `` | 在编辑器中编写 | | +| `` d `` | 删除 | 删除选定的工作树。这将删除工作树的目录以及 .git 目录中有关工作树的元数据。 | +| `` / `` | 通过文本过滤当前视图 | | + +## 提交 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 复制提交哈希到剪贴板 | | +| `` `` | 重置已拣选(复制)的提交 | | +| `` b `` | 查看二分查找选项 | | +| `` s `` | 压缩(Squash) | 将已选提交压缩到该提交之下。这些选定的提交的消息会附加到该提交的消息之下。 | +| `` f `` | 修正 (fixup) | 将选定的提交合并到其下面的提交中。与压缩类似,但所选提交的消息将被丢弃。 | +| `` r `` | 改写提交 | 重写所选提交的消息。 | +| `` R `` | 使用编辑器重命名提交 | | +| `` d `` | 删除提交 | 删除选中的提交。这将通过变基从分支中删除该提交,如果该提交修改的内容依赖于后续的提交,则需要解决合并冲突。 | +| `` e `` | 编辑(开始交互式变基) | 编辑提交 | +| `` i `` | 开始交互式变基 | 为分支上的提交启动交互式变基。这将包括从 HEAD 提交到第一个合并提交或主分支提交的所有提交。
如果您想从所选提交启动交互式变基,请按 `e`。 | +| `` p `` | 拣选(Pick) | 标记选中的提交为 picked(变基过程中)。这意味该提交将在后续的变基中保留。 | +| `` F `` | 为此提交创建修正 | 创建修正提交 | +| `` S `` | 应用该修复提交 | 压缩所选提交之上或当前分支的所有 “fixup!” 提交(自动压缩)。 | +| `` `` | 下移提交 | | +| `` `` | 上移提交 | | +| `` V `` | 粘贴提交(拣选) | | +| `` B `` | 标记一个主提交用于变基 | 选择下一次变基的主提交。当您变基到一个分支时,只有高于主提交的提交才会被引入。这使用“git rebase --onto”命令。 | +| `` A `` | 修补(Amend) | 用已暂存的变更来修补提交 | +| `` a `` | 修补提交属性 | 设置或重置提交的作者,或添加其他作者。 | +| `` t `` | 撤销(Revert) | 为所选提交创建还原提交,这会反向应用所选提交的更改。 | +| `` T `` | 标签提交 | 创建一个新标签指向所选提交。您可以在弹窗中输入标签名称和描述(可选)。 | +| `` `` | 打开日志菜单 | 查看提交日志的选项,例如更改排序顺序、隐藏 git graph、显示整个 git graph。 | +| `` `` | 检出 | 检出所选择的提交作为分离HEAD。 | +| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 | +| `` o `` | 在浏览器中打开提交 | | +| `` n `` | 从提交创建新分支 | | +| `` 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 `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 | +| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `` 来取消选择。 | +| `` `` | 使用外部差异比较工具(git difftool) | | +| `` * `` | 选择当前分支的提交 | | +| `` 0 `` | Focus main view | | +| `` `` | 查看提交的文件 | | +| `` w `` | 查看工作区选项 | | +| `` / `` | 开始搜索 | | + +## 提交信息 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 确认 | | +| `` `` | 关闭 | | + +## 提交文件 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 复制路径到剪贴板 | | +| `` 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。 | +| `` `` | 输入文件以将所选行添加到补丁中(或切换目录折叠) | 如果已选择一个文件,则Enter进入该文件,以便您可以向自定义补丁添加/删除单独的行。如果选择了目录,则切换目录。 | +| `` ` `` | 切换文件树视图 | 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 `` | Focus main view | | +| `` / `` | 开始搜索 | | + +## 文件 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 复制路径到剪贴板 | | +| `` `` | 切换暂存状态 | 为选定的文件切换暂存状态 | +| `` `` | 通过状态过滤文件 | | +| `` y `` | 复制到剪贴板 | | +| `` c `` | 提交变更 | 提交暂存文件 | +| `` w `` | 提交变更而无需预先提交钩子 | | +| `` 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 `` | View merge conflict options | View options for resolving merge conflicts. | +| `` f `` | 抓取 | 从远程获取变更 | +| `` - `` | 折叠全部文件 | 折叠文件树中的全部目录 | +| `` = `` | 展开全部文件 | 展开文件树中的全部目录 | +| `` 0 `` | Focus main view | | +| `` / `` | 开始搜索 | | + +## 本地分支 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 复制分支名称到剪贴板 | | +| `` i `` | 显示 git-flow 选项 | | +| `` `` | 检出 | 检出选中的项目 | +| `` n `` | 新分支 | | +| `` 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 `` | 创建拉取请求 | | +| `` O `` | 创建拉取请求选项 | | +| `` `` | 复制拉取请求 URL 到剪贴板 | | +| `` c `` | 按名称检出 | 按名称检出。在输入框中,您可以输入'-' 来切换到最后一个分支。 | +| `` - `` | Checkout previous branch | | +| `` F `` | 强制检出 | 强制检出所选分支。这将在检出所选分支之前放弃工作目录中的所有本地更改。 | +| `` d `` | 删除 | 查看本地/远程分支的删除选项 | +| `` r `` | 变基 | 将检出的分支变基到所选的分支上。 | +| `` M `` | 合并到当前检出的分支 | Merge selected branch into currently checked out branch. | +| `` f `` | 从上游快进此分支 | 将当前分支直接移动到远程追踪分支的最新提交 | +| `` T `` | 创建标签 | | +| `` s `` | 排序 | | +| `` g `` | 查看重置选项 | | +| `` R `` | 重命名分支 | | +| `` u `` | 查看上游选项 | 查看与分支上游相关的选项,例如设置/取消设置上游和重置为上游。 | +| `` `` | 使用外部差异比较工具(git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | 查看提交 | | +| `` w `` | 查看工作区选项 | | +| `` / `` | 通过文本过滤当前视图 | | + +## 构建补丁中 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 选择上一个区块 | | +| `` `` | 选择下一个区块 | | +| `` v `` | 切换拖动选择 | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | 复制选中文本到剪贴板 | | +| `` o `` | 打开文件 | 使用默认程序打开该文件 | +| `` e `` | 编辑文件 | 使用外部编辑器打开文件 | +| `` `` | 添加/移除 行到补丁 | | +| `` `` | 退出逐行模式 | | +| `` / `` | 开始搜索 | | + +## 标签 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 复制标签到剪贴板 | | +| `` `` | 检出 | 检出选择的标签作为分离的HEAD | +| `` n `` | 创建标签 | 基于当前提交创建一个新标签。您将在弹窗中输入标签名称和描述(可选)。 | +| `` d `` | 删除 | 查看本地/远程标签的删除选项 | +| `` P `` | 推送标签 | 推送选择的标签到远端。您将在弹窗中选择一个远端。 | +| `` g `` | 重置 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 | +| `` `` | 使用外部差异比较工具(git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | 查看提交 | | +| `` w `` | 查看工作区选项 | | +| `` / `` | 通过文本过滤当前视图 | | + +## 次要 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 切换到其他面板 | 切换到其他视图(已暂存/未暂存的变更) | +| `` `` | Exit back to side panel | | +| `` / `` | 开始搜索 | | + +## 正在合并 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 选中区块 | | +| `` b `` | 选中所有区块 | | +| `` `` | 选择顶部块 | | +| `` `` | 选择底部块 | | +| `` `` | 选择上一个冲突 | | +| `` `` | 选择下一个冲突 | | +| `` z `` | 撤销 | 撤消上次合并冲突解决 | +| `` e `` | 编辑文件 | 使用外部编辑器打开文件 | +| `` o `` | 打开文件 | 使用默认程序打开该文件 | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` `` | 返回文件面板 | | + +## 正在暂存 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 选择上一个区块 | | +| `` `` | 选择下一个区块 | | +| `` v `` | 切换拖动选择 | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | 复制选中文本到剪贴板 | | +| `` `` | 切换暂存状态 | 切换行暂存状态 | +| `` d `` | 取消变更(git reset) | 当选择未暂存的变更时,使用git reset丢弃该变更。当选择已暂存的变更时,取消暂存该变更 | +| `` o `` | 打开文件 | 使用默认程序打开该文件 | +| `` e `` | 编辑文件 | 使用外部编辑器打开文件 | +| `` `` | 返回文件面板 | | +| `` `` | 切换到其他面板 | 切换到其他视图(已暂存/未暂存的变更) | +| `` E `` | 编辑代码块 | 在外部编辑器中编辑选中的代码块 | +| `` c `` | 提交变更 | 提交暂存文件 | +| `` w `` | 提交变更而无需预先提交钩子 | | +| `` C `` | 使用 Git 编辑器提交变更 | | +| `` `` | 找到用于修复的基准提交 | 找到您当前变更所基于的提交,以便于修正/改进该提交。这样做可以省去您逐一查看分支提交来确定应该修正/改进哪个提交的麻烦。请参阅文档: | +| `` / `` | 开始搜索 | | + +## 正常 + +| Key | Action | Info | +|-----|--------|-------------| +| `` mouse wheel down (fn+up) `` | 向下滚动 | | +| `` mouse wheel up (fn+down) `` | 向上滚动 | | +| `` `` | 切换到其他面板 | 切换到其他视图(已暂存/未暂存的变更) | +| `` `` | Exit back to side panel | | +| `` / `` | 开始搜索 | | + +## 状态 + +| Key | Action | Info | +|-----|--------|-------------| +| `` o `` | 打开配置文件 | 使用默认程序打开该文件 | +| `` e `` | 编辑配置文件 | 使用外部编辑器打开文件 | +| `` u `` | 检查更新 | | +| `` `` | 切换到最近的仓库 | | +| `` a `` | 显示/循环所有分支日志 | | +| `` 0 `` | Focus main view | | + +## 确认面板 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 确认 | | +| `` `` | 关闭 | | +| `` `` | 复制到剪贴板 | | + +## 菜单 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 执行 | | +| `` `` | 关闭 | | +| `` / `` | 通过文本过滤当前视图 | | + +## 贮藏 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 应用 | 将贮藏项应用到您的工作目录。 | +| `` g `` | 应用并删除 | 将存储项应用到工作目录并删除存储项。 | +| `` d `` | 删除 | 从贮藏列表中删除该贮藏项 | +| `` n `` | 新分支 | 从选定的贮藏项创建一个新分支。这是通过 git 检查创建贮藏项的提交,从该提交创建一个新分支,然后将贮藏项作为附加提交应用到新分支来实现的。 | +| `` r `` | 重命名贮藏 | | +| `` 0 `` | Focus main view | | +| `` `` | 查看提交的文件 | | +| `` w `` | 查看工作区选项 | | +| `` / `` | 通过文本过滤当前视图 | | + +## 远程 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 查看分支 | | +| `` n `` | 添加新的远程仓库 | | +| `` d `` | 删除 | 删除选中的远程。从远程跟踪远程分支的任何本地分支都不会受到影响。 | +| `` e `` | 编辑 | 编辑远程仓库 | +| `` f `` | 抓取 | 抓取远程仓库 | +| `` / `` | 通过文本过滤当前视图 | | + +## 远程分支 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 复制分支名称到剪贴板 | | +| `` `` | 检出 | 基于当前选中的远程分支检出一个新的本地分支,或者将远程分支作分离的HEAD。 | +| `` n `` | 新分支 | | +| `` M `` | 合并到当前检出的分支 | Merge selected branch into currently checked out branch. | +| `` r `` | 变基 | 将检出的分支变基到所选的分支上。 | +| `` d `` | 删除 | 从远程删除远程分支。 | +| `` u `` | 设置为上游 | 设置为检出分支的上游 | +| `` s `` | 排序 | | +| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 | +| `` `` | 使用外部差异比较工具(git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | 查看提交 | | +| `` w `` | 查看工作区选项 | | +| `` / `` | 通过文本过滤当前视图 | | diff --git a/docs-master/keybindings/Keybindings_zh-TW.md b/docs-master/keybindings/Keybindings_zh-TW.md new file mode 100644 index 00000000000..8b80b74bcbc --- /dev/null +++ b/docs-master/keybindings/Keybindings_zh-TW.md @@ -0,0 +1,413 @@ +_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 鍵盤快捷鍵 + +_說明:`` 表示 Ctrl+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 `` | 推送 | 推送到遠端。如果沒有設定遠端,會開啟設定視窗。 | +| `` p `` | 拉取 | 從遠端同步當前分支。如果沒有設定遠端,會開啟設定視窗。 | +| `` ) `` | 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 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'. | +| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. | +| `` `` | 檢視自訂補丁選項 | | +| `` m `` | 查看合併/變基選項 | 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`. | +| `` + `` | 下一個螢幕模式(常規/半螢幕/全螢幕) | | +| `` _ `` | 上一個螢幕模式 | | +| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers | +| `` `` | 取消 | | +| `` ? `` | 開啟選單 | | +| `` `` | 檢視篩選路徑選項 | 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 `` | 結束 | | +| `` `` | 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 `` | 復原 | 將使用 reflog 確任 git 指令以復原。這不包括工作區更改;只考慮提交。 | +| `` Z `` | 取消復原 | 將使用 reflog 確任 git 指令以重作。這不包括工作區更改;只考慮提交。 | + +## 移動 + +| Key | Action | Info | +|-----|--------|-------------| +| `` , `` | 上一頁 | | +| `` . `` | 下一頁 | | +| `` < () `` | 捲動到頂部 | | +| `` > () `` | 捲動到底部 | | +| `` v `` | 切換拖曳選擇 | | +| `` `` | Range select down | | +| `` `` | Range select up | | +| `` / `` | 搜尋 | | +| `` H `` | 向左捲動 | | +| `` L `` | 向右捲動 | | +| `` ] `` | 下一個索引標籤 | | +| `` [ `` | 上一個索引標籤 | | + +## Input prompt + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 確認 | | +| `` `` | 關閉/取消 | | + +## 主面板 (補丁生成) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 選擇上一段 | | +| `` `` | 選擇下一段 | | +| `` v `` | 切換拖曳選擇 | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. hunk selection mode. | +| `` `` | 複製所選文本至剪貼簿 | | +| `` o `` | 開啟檔案 | 使用預設軟體開啟 | +| `` e `` | 編輯檔案 | 使用外部編輯器開啟 | +| `` `` | 向 (或從) 補丁中添加/刪除行 | | +| `` `` | 退出自訂補丁建立器 | | +| `` / `` | 搜尋 | | + +## 主面板(一般) + +| Key | Action | Info | +|-----|--------|-------------| +| `` mouse wheel down (fn+up) `` | 向下捲動 | | +| `` mouse wheel up (fn+down) `` | 向上捲動 | | +| `` `` | 切換至另一個面板 (已預存/未預存更改) | Switch to other view (staged/unstaged changes). | +| `` `` | Exit back to side panel | | +| `` / `` | 搜尋 | | + +## 主面板(合併) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 挑選程式碼片段 | | +| `` b `` | 挑選所有程式碼片段 | | +| `` `` | 選擇上一段 | | +| `` `` | 選擇下一段 | | +| `` `` | 選擇上一個衝突 | | +| `` `` | 選擇下一個衝突 | | +| `` z `` | 復原 | Undo last merge conflict resolution. | +| `` e `` | 編輯檔案 | 使用外部編輯器開啟 | +| `` o `` | 開啟檔案 | 使用預設軟體開啟 | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` `` | 返回檔案面板 | | + +## 主面板(預存) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 選擇上一段 | | +| `` `` | 選擇下一段 | | +| `` v `` | 切換拖曳選擇 | | +| `` a `` | Toggle hunk selection | Toggle line-by-line vs. 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 `` | 開啟檔案 | 使用預設軟體開啟 | +| `` e `` | 編輯檔案 | 使用外部編輯器開啟 | +| `` `` | 返回檔案面板 | | +| `` `` | 切換至另一個面板 (已預存/未預存更改) | Switch to other view (staged/unstaged changes). | +| `` E `` | 編輯程式碼塊 | Edit selected hunk in external editor. | +| `` c `` | 提交變更 | 提交暫存區變更 | +| `` w `` | 沒有預提交 hook 就提交更改 | | +| `` 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: | +| `` / `` | 搜尋 | | + +## 功能表 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 執行 | | +| `` `` | 關閉/取消 | | +| `` / `` | 搜尋 | | + +## 子提交 + +| 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 `` | 從提交建立新分支 | | +| `` 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 `` | 檢視重設選項 | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` C `` | 複製提交 (揀選) | 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. | +| `` `` | 重設選定的揀選 (複製) 提交 | | +| `` `` | 開啟外部差異工具 (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | 檢視所選項目的檔案 | | +| `` w `` | 檢視工作目錄選項 | | +| `` / `` | 搜尋 | | + +## 子模組 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 複製子模組名稱到剪貼簿 | | +| `` `` | Enter | 進入子模組 | +| `` d `` | Remove | Remove the selected submodule and its corresponding directory. | +| `` u `` | Update | 更新子模組 | +| `` n `` | 新增子模組 | | +| `` e `` | 更新子模組 URL | | +| `` i `` | Initialize | 初始化子模組 | +| `` b `` | 查看批量子模組選項 | | +| `` / `` | 搜尋 | | + +## 工作目錄 + +| Key | Action | Info | +|-----|--------|-------------| +| `` n `` | New worktree | | +| `` `` | Switch | Switch to the selected worktree. | +| `` o `` | 在編輯器中開啟 | | +| `` 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. | +| `` / `` | 搜尋 | | + +## 提交 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 複製提交 hash 到剪貼簿 | | +| `` `` | 重設選定的揀選 (複製) 提交 | | +| `` b `` | 查看二分選項 | | +| `` 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 `` | 改寫提交 | 改寫選中的提交訊息 | +| `` 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 `` | 編輯(開始互動變基) | 編輯提交 | +| `` i `` | 開始互動變基 | 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 `` | 挑選 | 挑選提交 (於變基過程中) | +| `` F `` | 建立修復提交 | 為此提交建立修復提交 | +| `` S `` | 壓縮上方所有「fixup」提交(自動壓縮) | 是否壓縮上方 {{.commit}} 所有「fixup」提交? | +| `` `` | 向下移動提交 | | +| `` `` | 向上移動提交 | | +| `` V `` | 貼上提交 (揀選) | | +| `` B `` | 為了變基已標注提交為基準提交 | 請為了下一次變基選擇一項基準提交;此將執行 `git rebase --onto`。 | +| `` A `` | 修改 | 使用已預存的更改修正提交 | +| `` a `` | 設定/重設提交作者 | Set/Reset commit author or set co-author. | +| `` t `` | 還原 | 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). | +| `` o `` | 在瀏覽器中開啟提交 | | +| `` n `` | 從提交建立新分支 | | +| `` 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 `` | 檢視重設選項 | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` C `` | 複製提交 (揀選) | 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. | +| `` `` | 開啟外部差異工具 (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | 檢視所選項目的檔案 | | +| `` w `` | 檢視工作目錄選項 | | +| `` / `` | 搜尋 | | + +## 提交摘要 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 確認 | | +| `` `` | 關閉 | | + +## 提交檔案 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 複製檔案名稱到剪貼簿 | | +| `` y `` | 複製到剪貼簿 | | +| `` c `` | 檢出 | 檢出檔案 | +| `` 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 `` | 開啟檔案 | 使用預設軟體開啟 | +| `` e `` | 編輯 | 使用外部編輯器開啟 | +| `` `` | 開啟外部差異工具 (git difftool) | | +| `` `` | 切換檔案是否包含在補丁中 | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` a `` | 切換所有檔案是否包含在補丁中 | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` `` | 輸入檔案以將選定的行添加至補丁(或切換目錄折疊) | 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.

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 | | +| `` / `` | 搜尋 | | + +## 收藏 (Stash) + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 套用 | Apply the stash entry to your working directory. | +| `` g `` | 還原 | Apply the stash entry to your working directory and remove the stash entry. | +| `` d `` | 捨棄 | 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 `` | 重新命名收藏 | | +| `` 0 `` | Focus main view | | +| `` `` | 檢視所選項目的檔案 | | +| `` w `` | 檢視工作目錄選項 | | +| `` / `` | 搜尋 | | + +## 日誌 + +| 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 `` | 從提交建立新分支 | | +| `` 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 `` | 檢視重設選項 | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` C `` | 複製提交 (揀選) | 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. | +| `` `` | 重設選定的揀選 (複製) 提交 | | +| `` `` | 開啟外部差異工具 (git difftool) | | +| `` * `` | Select commits of current branch | | +| `` 0 `` | Focus main view | | +| `` `` | 檢視提交 | | +| `` w `` | 檢視工作目錄選項 | | +| `` / `` | 搜尋 | | + +## 本地分支 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 複製分支名稱到剪貼簿 | | +| `` i `` | 顯示 git-flow 選項 | | +| `` `` | 檢出 | 檢出選定的項目。 | +| `` n `` | 新分支 | | +| `` 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 `` | 建立拉取請求 | | +| `` O `` | 建立拉取請求選項 | | +| `` `` | 複製拉取請求的 URL 到剪貼板 | | +| `` c `` | 根據名稱檢出 | Checkout by name. In the input box you can enter '-' to switch to the previous branch. | +| `` - `` | Checkout previous branch | | +| `` F `` | 強制檢出 | Force checkout selected branch. This will discard all local changes in your working directory before checking out the selected branch. | +| `` d `` | 刪除 | View delete options for local/remote branch. | +| `` r `` | 將已檢出的分支變基至此分支 | 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 `` | 從上游快進此分支 | 從遠端快進所選的分支 | +| `` T `` | 建立標籤 | | +| `` s `` | 排序規則 | | +| `` g `` | 檢視重設選項 | | +| `` R `` | 重新命名分支 | | +| `` u `` | 檢視遠端設定 | 檢視有關遠端分支的設定(例如重設至遠端) | +| `` `` | 開啟外部差異工具 (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | 檢視提交 | | +| `` w `` | 檢視工作目錄選項 | | +| `` / `` | 搜尋 | | + +## 標籤 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | Copy tag to clipboard | | +| `` `` | 檢出 | Checkout the selected 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 `` | 刪除 | View delete options for local/remote tag. | +| `` P `` | 推送標籤 | Push the selected tag to a remote. You'll be prompted to select a remote. | +| `` g `` | 重設 | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` `` | 開啟外部差異工具 (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | 檢視提交 | | +| `` w `` | 檢視工作目錄選項 | | +| `` / `` | 搜尋 | | + +## 檔案 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 複製檔案名稱到剪貼簿 | | +| `` `` | 切換預存 | Toggle staged for selected file. | +| `` `` | 篩選檔案 (預存/未預存) | | +| `` y `` | 複製到剪貼簿 | | +| `` c `` | 提交變更 | 提交暫存區變更 | +| `` w `` | 沒有預提交 hook 就提交更改 | | +| `` A `` | 修改上次提交 | | +| `` 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 `` | 編輯 | 使用外部編輯器開啟 | +| `` o `` | 開啟檔案 | 使用預設軟體開啟 | +| `` i `` | 忽略或排除檔案 | | +| `` r `` | 重新整理檔案 | | +| `` s `` | 收藏 | Stash all changes. For other variations of stashing, use the view stash options keybinding. | +| `` S `` | 檢視收藏選項 | View stash options (e.g. stash all, stash staged, stash unstaged). | +| `` a `` | 全部預存/取消預存 | Toggle staged/unstaged for all files in working tree. | +| `` `` | 選擇檔案中的單個程式碼塊/行,或展開/折疊目錄 | 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 `` | 捨棄 | 檢視選中變動進行捨棄復原 | +| `` g `` | 檢視遠端重設選項 | | +| `` D `` | 重設 | 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.

The default can be changed in the config file with the key 'gui.showFileTree'. | +| `` `` | 開啟外部差異工具 (git difftool) | | +| `` M `` | View merge conflict options | View options for resolving merge conflicts. | +| `` f `` | 擷取 | 同步遠端異動 | +| `` - `` | Collapse all files | Collapse all directories in the files tree | +| `` = `` | Expand all files | Expand all directories in the file tree | +| `` 0 `` | Focus main view | | +| `` / `` | 搜尋 | | + +## 次要 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 切換至另一個面板 (已預存/未預存更改) | Switch to other view (staged/unstaged changes). | +| `` `` | Exit back to side panel | | +| `` / `` | 搜尋 | | + +## 狀態 + +| Key | Action | Info | +|-----|--------|-------------| +| `` o `` | 開啟設定檔案 | 使用預設軟體開啟 | +| `` e `` | 編輯設定檔案 | 使用外部編輯器開啟 | +| `` u `` | 檢查更新 | | +| `` `` | 切換到最近使用的版本庫 | | +| `` a `` | Show/cycle all branch logs | | +| `` 0 `` | Focus main view | | + +## 確認面板 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 確認 | | +| `` `` | 關閉/取消 | | +| `` `` | 複製到剪貼簿 | | + +## 遠端 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | View branches | | +| `` n `` | 新增遠端 | | +| `` d `` | Remove | Remove the selected remote. Any local branches tracking a remote branch from the remote will be unaffected. | +| `` e `` | 編輯 | 編輯遠端 | +| `` f `` | 擷取 | 擷取遠端 | +| `` / `` | 搜尋 | | + +## 遠端分支 + +| Key | Action | Info | +|-----|--------|-------------| +| `` `` | 複製分支名稱到剪貼簿 | | +| `` `` | 檢出 | Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head. | +| `` n `` | 新分支 | | +| `` M `` | 合併到當前檢出的分支 | View options for merging the selected item into the current branch (regular merge, squash merge) | +| `` r `` | 將已檢出的分支變基至此分支 | Rebase the checked-out branch onto the selected branch. | +| `` d `` | 刪除 | Delete the remote branch from the remote. | +| `` u `` | 設置為遠端 | 將此分支設為當前分支之遠端 | +| `` s `` | 排序規則 | | +| `` g `` | 檢視重設選項 | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` `` | 開啟外部差異工具 (git difftool) | | +| `` 0 `` | Focus main view | | +| `` `` | 檢視提交 | | +| `` w `` | 檢視工作目錄選項 | | +| `` / `` | 搜尋 | | diff --git a/docs/Config.md b/docs/Config.md index 614d8d79a64..67198627d34 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -1023,7 +1023,7 @@ Supported versions are "2" and "3". The deprecated config `showIcons` sets the v ## Keybindings -For all possible keybinding options, check [Custom_Keybindings.md](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md) +For all possible keybinding options, check [Custom_Keybindings.md](keybindings/Custom_Keybindings.md) You can disable certain key bindings by specifying ``. diff --git a/pkg/cheatsheet/generate.go b/pkg/cheatsheet/generate.go index 5ec63aa9f83..17aca5e385c 100644 --- a/pkg/cheatsheet/generate.go +++ b/pkg/cheatsheet/generate.go @@ -1,7 +1,7 @@ //go:generate go run generator.go // This "script" generates files called Keybindings_{{.LANG}}.md -// in the docs/keybindings directory. +// in the docs-master/keybindings directory. // // The content of these generated files is a keybindings cheatsheet. // @@ -49,7 +49,7 @@ func CommandToRun() string { } func GetKeybindingsDir() string { - return utils.GetLazyRootDirectory() + "/docs/keybindings" + return utils.GetLazyRootDirectory() + "/docs-master/keybindings" } func generateAtDir(cheatsheetDir string) { diff --git a/pkg/jsonschema/generate.go b/pkg/jsonschema/generate.go index 5350ca46cc9..5e7267e3e92 100644 --- a/pkg/jsonschema/generate.go +++ b/pkg/jsonschema/generate.go @@ -16,7 +16,7 @@ import ( ) func GetSchemaDir() string { - return utils.GetLazyRootDirectory() + "/schema" + return utils.GetLazyRootDirectory() + "/schema-master" } func GenerateSchema() *jsonschema.Schema { diff --git a/pkg/jsonschema/generate_config_docs.go b/pkg/jsonschema/generate_config_docs.go index f062f437f29..b9de5c54beb 100644 --- a/pkg/jsonschema/generate_config_docs.go +++ b/pkg/jsonschema/generate_config_docs.go @@ -163,7 +163,7 @@ func (n *Node) MarshalYAML() (interface{}, error) { } func writeToConfigDocs(config []byte) error { - configPath := utils.GetLazyRootDirectory() + "/docs/Config.md" + configPath := utils.GetLazyRootDirectory() + "/docs-master/Config.md" markdown, err := os.ReadFile(configPath) if err != nil { return fmt.Errorf("Error reading Config.md file %w", err) diff --git a/schema-master/config.json b/schema-master/config.json new file mode 100644 index 00000000000..4aaa7a655e4 --- /dev/null +++ b/schema-master/config.json @@ -0,0 +1,1999 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/jesseduffield/lazygit/pkg/config/user-config", + "$ref": "#/$defs/UserConfig", + "$defs": { + "CommitConfig": { + "properties": { + "signOff": { + "type": "boolean", + "description": "If true, pass '--signoff' flag when committing", + "default": false + }, + "autoWrapCommitMessage": { + "type": "boolean", + "description": "Automatic WYSIWYG wrapping of the commit message as you type", + "default": true + }, + "autoWrapWidth": { + "type": "integer", + "description": "If autoWrapCommitMessage is true, the width to wrap to", + "default": 72 + } + }, + "additionalProperties": false, + "type": "object", + "description": "Config relating to committing" + }, + "CommitLengthConfig": { + "properties": { + "show": { + "type": "boolean", + "description": "If true, show an indicator of commit message length", + "default": true + } + }, + "additionalProperties": false, + "type": "object", + "description": "Config relating to the commit length indicator" + }, + "CommitPrefixConfig": { + "properties": { + "pattern": { + "type": "string", + "description": "pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use \"^\\\\w+\\\\/(\\\\w+-\\\\w+).*\"", + "examples": [ + "^\\w+\\/(\\w+-\\w+).*" + ] + }, + "replace": { + "type": "string", + "description": "Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use \"[$1] \"", + "examples": [ + "[$1]" + ] + } + }, + "additionalProperties": false, + "type": "object" + }, + "CustomCommand": { + "properties": { + "key": { + "type": "string", + "description": "The key to trigger the command. Use a single letter or one of the values from https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md" + }, + "commandMenu": { + "items": { + "$ref": "#/$defs/CustomCommand" + }, + "type": "array", + "description": "Instead of defining a single custom command, create a menu of custom commands. Useful for grouping related commands together under a single keybinding, and for keeping them out of the global keybindings menu.\nWhen using this, all other fields except Key and Description are ignored and must be empty." + }, + "context": { + "type": "string", + "description": "The context in which to listen for the key. Valid values are: status, files, worktrees, localBranches, remotes, remoteBranches, tags, commits, reflogCommits, subCommits, commitFiles, stash, and global. Multiple contexts separated by comma are allowed; most useful for \"commits, subCommits\" or \"files, commitFiles\".", + "examples": [ + "status", + "files", + "worktrees", + "localBranches", + "remotes", + "remoteBranches", + "tags", + "commits", + "reflogCommits", + "subCommits", + "commitFiles", + "stash", + "global" + ] + }, + "command": { + "type": "string", + "description": "The command to run (using Go template syntax for placeholder values)", + "examples": [ + "git fetch {{.Form.Remote}} {{.Form.Branch}} \u0026\u0026 git checkout FETCH_HEAD" + ] + }, + "prompts": { + "items": { + "$ref": "#/$defs/CustomCommandPrompt" + }, + "type": "array", + "description": "A list of prompts that will request user input before running the final command" + }, + "loadingText": { + "type": "string", + "description": "Text to display while waiting for command to finish", + "examples": [ + "Loading..." + ] + }, + "description": { + "type": "string", + "description": "Label for the custom command when displayed in the keybindings menu" + }, + "output": { + "type": "string", + "enum": [ + "none", + "terminal", + "log", + "logWithPty", + "popup" + ], + "description": "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." + }, + "outputTitle": { + "type": "string", + "description": "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." + }, + "after": { + "$ref": "#/$defs/CustomCommandAfterHook", + "description": "Actions to take after the command has completed" + } + }, + "additionalProperties": false, + "type": "object" + }, + "CustomCommandAfterHook": { + "properties": { + "checkForConflicts": { + "type": "boolean" + } + }, + "additionalProperties": false, + "type": "object" + }, + "CustomCommandMenuOption": { + "properties": { + "name": { + "type": "string", + "description": "The first part of the label" + }, + "description": { + "type": "string", + "description": "The second part of the label" + }, + "value": { + "type": "string", + "minLength": 1, + "description": "The value that will be used in the command", + "examples": [ + "feature" + ] + } + }, + "additionalProperties": false, + "type": "object" + }, + "CustomCommandPrompt": { + "properties": { + "type": { + "type": "string", + "description": "One of: 'input' | 'menu' | 'confirm' | 'menuFromCommand'" + }, + "key": { + "type": "string", + "description": "Used to reference the entered value from within the custom command. E.g. a prompt with `key: 'Branch'` can be referred to as `{{.Form.Branch}}` in the command" + }, + "title": { + "type": "string", + "description": "The title to display in the popup panel" + }, + "initialValue": { + "type": "string", + "description": "The initial value to appear in the text box.\nOnly for input prompts." + }, + "suggestions": { + "$ref": "#/$defs/CustomCommandSuggestions", + "description": "Shows suggestions as the input is entered\nOnly for input prompts." + }, + "body": { + "type": "string", + "description": "The message of the confirmation prompt.\nOnly for confirm prompts.", + "examples": [ + "Are you sure you want to push to the remote?" + ] + }, + "options": { + "items": { + "$ref": "#/$defs/CustomCommandMenuOption" + }, + "type": "array", + "description": "Menu options.\nOnly for menu prompts." + }, + "command": { + "type": "string", + "description": "The command to run to generate menu options\nOnly for menuFromCommand prompts.", + "examples": [ + "git fetch {{.Form.Remote}} {{.Form.Branch}} \u0026\u0026 git checkout FETCH_HEAD" + ] + }, + "filter": { + "type": "string", + "description": "The regexp to run specifying groups which are going to be kept from the command's output.\nOnly for menuFromCommand prompts.", + "examples": [ + ".*{{.SelectedRemote.Name }}/(?P\u003cbranch\u003e.*)" + ] + }, + "valueFormat": { + "type": "string", + "description": "How to format matched groups from the filter to construct a menu item's value.\nOnly for menuFromCommand prompts.", + "examples": [ + "{{ .branch }}" + ] + }, + "labelFormat": { + "type": "string", + "description": "Like valueFormat but for the labels. If `labelFormat` is not specified, `valueFormat` is shown instead.\nOnly for menuFromCommand prompts.", + "examples": [ + "{{ .branch | green }}" + ] + } + }, + "additionalProperties": false, + "type": "object" + }, + "CustomCommandSuggestions": { + "properties": { + "preset": { + "type": "string", + "enum": [ + "authors", + "branches", + "files", + "refs", + "remotes", + "remoteBranches", + "tags" + ], + "description": "Uses built-in logic to obtain the suggestions. One of 'authors' | 'branches' | 'files' | 'refs' | 'remotes' | 'remoteBranches' | 'tags'" + }, + "command": { + "type": "string", + "description": "Command to run such that each line in the output becomes a suggestion. Mutually exclusive with 'preset' field.", + "examples": [ + "git fetch {{.Form.Remote}} {{.Form.Branch}} \u0026\u0026 git checkout FETCH_HEAD" + ] + } + }, + "additionalProperties": false, + "type": "object" + }, + "CustomIconsConfig": { + "properties": { + "filenames": { + "additionalProperties": { + "$ref": "#/$defs/IconProperties" + }, + "type": "object", + "description": "Map of filenames to icon properties (icon and color)" + }, + "extensions": { + "additionalProperties": { + "$ref": "#/$defs/IconProperties" + }, + "type": "object", + "description": "Map of file extensions (including the dot) to icon properties (icon and color)" + } + }, + "additionalProperties": false, + "type": "object", + "description": "Custom icons for filenames and file extensions\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-files-icon--color" + }, + "GitConfig": { + "properties": { + "pagers": { + "items": { + "$ref": "#/$defs/PagingConfig" + }, + "type": "array", + "description": "Array of pagers. Each entry has the following format:\n\n # Value of the --color arg in the git diff command. Some pagers want\n # this to be set to 'always' and some want it set to 'never'\n colorArg: \"always\"\n\n # e.g.\n # diff-so-fancy\n # delta --dark --paging=never\n # ydiff -p cat -s --wrap --width={{columnWidth}}\n pager: \"\"\n\n # e.g. 'difft --color=always'\n externalDiffCommand: \"\"\n\n # If true, Lazygit will use git's `diff.external` config for paging.\n # The advantage over `externalDiffCommand` is that this can be\n # configured per file type in .gitattributes; see\n # https://git-scm.com/docs/gitattributes#_defining_an_external_diff_driver.\n useExternalDiffGitConfig: false\n\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md for more information." + }, + "commit": { + "$ref": "#/$defs/CommitConfig", + "description": "Config relating to committing" + }, + "merging": { + "$ref": "#/$defs/MergingConfig", + "description": "Config relating to merging" + }, + "mainBranches": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true, + "description": "list of branches that are considered 'main' branches, used when displaying commits", + "default": [ + "master", + "main" + ] + }, + "skipHookPrefix": { + "type": "string", + "description": "Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'", + "default": "WIP" + }, + "autoFetch": { + "type": "boolean", + "description": "If true, periodically fetch from remote", + "default": true + }, + "autoRefresh": { + "type": "boolean", + "description": "If true, periodically refresh files and submodules", + "default": true + }, + "autoForwardBranches": { + "type": "string", + "enum": [ + "none", + "onlyMainBranches", + "allBranches" + ], + "description": "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).\nPossible values: 'none' | 'onlyMainBranches' | 'allBranches'", + "default": "onlyMainBranches" + }, + "fetchAll": { + "type": "boolean", + "description": "If true, pass the --all arg to git fetch", + "default": true + }, + "autoStageResolvedConflicts": { + "type": "boolean", + "description": "If true, lazygit will automatically stage files that used to have merge conflicts but no longer do; and it will also ask you if you want to continue a merge or rebase if you've resolved all conflicts. If false, it won't do either of these things.", + "default": true + }, + "branchLogCmd": { + "type": "string", + "description": "Command used when displaying the current branch git log in the main window", + "default": "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --" + }, + "allBranchesLogCmds": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Commands used to display git log of all branches in the main window, they will be cycled in order of appearance (array of strings)", + "default": [ + "git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium" + ] + }, + "ignoreWhitespaceInDiffView": { + "type": "boolean", + "description": "If true, git diffs are rendered with the `--ignore-all-space` flag, which ignores whitespace changes. Can be toggled from within Lazygit with `\u003cc-w\u003e`.", + "default": false + }, + "diffContextSize": { + "type": "integer", + "description": "The number of lines of context to show around each diff hunk. Can be changed from within Lazygit with the `{` and `}` keys.", + "default": 3 + }, + "renameSimilarityThreshold": { + "type": "integer", + "maximum": 100, + "minimum": 0, + "description": "The threshold for considering a file to be renamed, in percent. Can be changed from within Lazygit with the `(` and `)` keys.", + "default": 50 + }, + "overrideGpg": { + "type": "boolean", + "description": "If true, do not spawn a separate process when using GPG", + "default": false + }, + "disableForcePushing": { + "type": "boolean", + "description": "If true, do not allow force pushes", + "default": false + }, + "commitPrefix": { + "items": { + "$ref": "#/$defs/CommitPrefixConfig" + }, + "type": "array", + "description": "See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix" + }, + "commitPrefixes": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/CommitPrefixConfig" + }, + "type": "array" + }, + "type": "object", + "description": "See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix" + }, + "branchPrefix": { + "type": "string", + "description": "See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix" + }, + "parseEmoji": { + "type": "boolean", + "description": "If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀\n(This should really be under 'gui', not 'git')", + "default": false + }, + "log": { + "$ref": "#/$defs/LogConfig", + "description": "Config for showing the log in the commits view" + }, + "localBranchSortOrder": { + "type": "string", + "enum": [ + "date", + "recency", + "alphabetical" + ], + "description": "How branches are sorted in the local branches view.\nOne of: 'date' (default) | 'recency' | 'alphabetical'\nCan be changed from within Lazygit with the Sort Order menu (`s`) in the branches panel.", + "default": "date" + }, + "remoteBranchSortOrder": { + "type": "string", + "enum": [ + "date", + "alphabetical" + ], + "description": "How branches are sorted in the remote branches view.\nOne of: 'date' (default) | 'alphabetical'\nCan be changed from within Lazygit with the Sort Order menu (`s`) in the remote branches panel.", + "default": "date" + }, + "truncateCopiedCommitHashesTo": { + "type": "integer", + "description": "When copying commit hashes to the clipboard, truncate them to this length. Set to 40 to disable truncation.", + "default": 12 + } + }, + "additionalProperties": false, + "type": "object", + "description": "Config relating to git" + }, + "GuiConfig": { + "properties": { + "authorColors": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-author-color" + }, + "branchColors": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-branch-color\nDeprecated: use branchColorPatterns instead" + }, + "branchColorPatterns": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-branch-color" + }, + "customIcons": { + "$ref": "#/$defs/CustomIconsConfig", + "description": "Custom icons for filenames and file extensions\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-files-icon--color" + }, + "scrollHeight": { + "type": "integer", + "minimum": 1, + "description": "The number of lines you scroll by when scrolling the main window", + "default": 2 + }, + "scrollPastBottom": { + "type": "boolean", + "description": "If true, allow scrolling past the bottom of the content in the main window", + "default": true + }, + "scrollOffMargin": { + "type": "integer", + "description": "See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin", + "default": 2 + }, + "scrollOffBehavior": { + "type": "string", + "description": "One of: 'margin' (default) | 'jump'", + "default": "margin" + }, + "tabWidth": { + "type": "integer", + "minimum": 1, + "description": "The number of spaces per tab; used for everything that's shown in the main view, but probably mostly relevant for diffs.\nNote that when using a pager, the pager has its own tab width setting, so you need to pass it separately in the pager command.", + "default": 4 + }, + "mouseEvents": { + "type": "boolean", + "description": "If true, capture mouse events.\nWhen mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.", + "default": true + }, + "skipAmendWarning": { + "type": "boolean", + "description": "If true, do not show a warning when amending a commit.", + "default": false + }, + "skipDiscardChangeWarning": { + "type": "boolean", + "description": "If true, do not show a warning when discarding changes in the staging view.", + "default": false + }, + "skipStashWarning": { + "type": "boolean", + "description": "If true, do not show warning when applying/popping the stash", + "default": false + }, + "skipNoStagedFilesWarning": { + "type": "boolean", + "description": "If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.", + "default": false + }, + "skipRewordInEditorWarning": { + "type": "boolean", + "description": "If true, do not show a warning when rewording a commit via an external editor", + "default": false + }, + "skipSwitchWorktreeOnCheckoutWarning": { + "type": "boolean", + "description": "If true, switch to a different worktree without confirmation when checking out a branch that is checked out in that worktree", + "default": false + }, + "sidePanelWidth": { + "type": "number", + "maximum": 1, + "minimum": 0, + "description": "Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section.\nNumber from 0 to 1.0.", + "default": 0.3333 + }, + "expandFocusedSidePanel": { + "type": "boolean", + "description": "If true, increase the height of the focused side window; creating an accordion effect.", + "default": false + }, + "expandedSidePanelWeight": { + "type": "integer", + "description": "The weight of the expanded side panel, relative to the other panels. 2 means twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.", + "default": 2 + }, + "mainPanelSplitMode": { + "type": "string", + "enum": [ + "horizontal", + "flexible", + "vertical" + ], + "description": "Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.\nOptions are:\n- 'horizontal': split the window horizontally\n- 'vertical': split the window vertically\n- 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically", + "default": "flexible" + }, + "enlargedSideViewLocation": { + "type": "string", + "description": "How the window is split when in half screen mode (i.e. after hitting '+' once).\nPossible values:\n- 'left': split the window horizontally (side panel on the left, main view on the right)\n- 'top': split the window vertically (side panel on top, main view below)", + "default": "left" + }, + "wrapLinesInStagingView": { + "type": "boolean", + "description": "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.", + "default": true + }, + "useHunkModeInStagingView": { + "type": "boolean", + "description": "If true, hunk selection mode will be enabled by default when entering the staging view.", + "default": true + }, + "language": { + "type": "string", + "enum": [ + "auto", + "en", + "zh-TW", + "zh-CN", + "pl", + "nl", + "ja", + "ko", + "ru" + ], + "description": "One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru' | 'pt'", + "default": "auto" + }, + "timeFormat": { + "type": "string", + "description": "Format used when displaying time e.g. commit time.\nUses Go's time format syntax: https://pkg.go.dev/time#Time.Format", + "default": "02 Jan 06" + }, + "shortTimeFormat": { + "type": "string", + "description": "Format used when displaying time if the time is less than 24 hours ago.\nUses Go's time format syntax: https://pkg.go.dev/time#Time.Format", + "default": "3:04PM" + }, + "theme": { + "$ref": "#/$defs/ThemeConfig", + "description": "Config relating to colors and styles.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes" + }, + "commitLength": { + "$ref": "#/$defs/CommitLengthConfig", + "description": "Config relating to the commit length indicator" + }, + "showListFooter": { + "type": "boolean", + "description": "If true, show the '5 of 20' footer at the bottom of list views", + "default": true + }, + "showFileTree": { + "type": "boolean", + "description": "If true, display the files in the file views as a tree. If false, display the files as a flat list.\nThis can be toggled from within Lazygit with the '`' key, but that will not change the default.", + "default": true + }, + "showRootItemInFileTree": { + "type": "boolean", + "description": "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.", + "default": true + }, + "showNumstatInFilesView": { + "type": "boolean", + "description": "If true, show the number of lines changed per file in the Files view", + "default": false + }, + "showRandomTip": { + "type": "boolean", + "description": "If true, show a random tip in the command log when Lazygit starts", + "default": true + }, + "showCommandLog": { + "type": "boolean", + "description": "If true, show the command log", + "default": true + }, + "showBottomLine": { + "type": "boolean", + "description": "If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.", + "default": true + }, + "showPanelJumps": { + "type": "boolean", + "description": "If true, show jump-to-window keybindings in window titles.", + "default": true + }, + "showIcons": { + "type": "boolean", + "description": "Deprecated: use nerdFontsVersion instead", + "default": false + }, + "nerdFontsVersion": { + "type": "string", + "enum": [ + "2", + "3", + "" + ], + "description": "Nerd fonts version to use.\nOne of: '2' | '3' | empty string (default)\nIf empty, do not show icons." + }, + "showFileIcons": { + "type": "boolean", + "description": "If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.", + "default": true + }, + "commitAuthorShortLength": { + "type": "integer", + "description": "Length of author name in (non-expanded) commits view. 2 means show initials only.", + "default": 2 + }, + "commitAuthorLongLength": { + "type": "integer", + "description": "Length of author name in expanded commits view. 2 means show initials only.", + "default": 17 + }, + "commitHashLength": { + "type": "integer", + "minimum": 0, + "description": "Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.", + "default": 8 + }, + "showBranchCommitHash": { + "type": "boolean", + "description": "If true, show commit hashes alongside branch names in the branches view.", + "default": false + }, + "showDivergenceFromBaseBranch": { + "type": "string", + "enum": [ + "none", + "onlyArrow", + "arrowAndNumber" + ], + "description": "Whether to show the divergence from the base branch in the branches view.\nOne of: 'none' | 'onlyArrow' | 'arrowAndNumber'", + "default": "none" + }, + "commandLogSize": { + "type": "integer", + "minimum": 0, + "description": "Height of the command log view", + "default": 8 + }, + "splitDiff": { + "type": "string", + "enum": [ + "auto", + "always" + ], + "description": "Whether to split the main window when viewing file changes.\nOne of: 'auto' | 'always'\nIf 'auto', only split the main window when a file has both staged and unstaged changes", + "default": "auto" + }, + "screenMode": { + "type": "string", + "enum": [ + "normal", + "half", + "full" + ], + "description": "Default size for focused window. Can be changed from within Lazygit with '+' and '_' (but this won't change the default).\nOne of: 'normal' (default) | 'half' | 'full'", + "default": "normal" + }, + "border": { + "type": "string", + "enum": [ + "single", + "double", + "rounded", + "hidden", + "bold" + ], + "description": "Window border style.\nOne of 'rounded' (default) | 'single' | 'double' | 'hidden' | 'bold'", + "default": "rounded" + }, + "animateExplosion": { + "type": "boolean", + "description": "If true, show a seriously epic explosion animation when nuking the working tree.", + "default": true + }, + "portraitMode": { + "type": "string", + "description": "Whether to stack UI components on top of each other.\nOne of 'auto' (default) | 'always' | 'never'", + "default": "auto" + }, + "filterMode": { + "type": "string", + "enum": [ + "substring", + "fuzzy" + ], + "description": "How things are filtered when typing '/'.\nOne of 'substring' (default) | 'fuzzy'", + "default": "substring" + }, + "spinner": { + "$ref": "#/$defs/SpinnerConfig", + "description": "Config relating to the spinner." + }, + "statusPanelView": { + "type": "string", + "enum": [ + "dashboard", + "allBranchesLog" + ], + "description": "Status panel view.\nOne of 'dashboard' (default) | 'allBranchesLog'", + "default": "dashboard" + }, + "switchToFilesAfterStashPop": { + "type": "boolean", + "description": "If true, jump to the Files panel after popping a stash", + "default": true + }, + "switchToFilesAfterStashApply": { + "type": "boolean", + "description": "If true, jump to the Files panel after applying a stash", + "default": true + }, + "switchTabsWithPanelJumpKeys": { + "type": "boolean", + "description": "If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead", + "default": false + } + }, + "additionalProperties": false, + "type": "object", + "description": "Config relating to the Lazygit UI" + }, + "IconProperties": { + "properties": { + "icon": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingAmendAttributeConfig": { + "properties": { + "resetAuthor": { + "type": "string", + "default": "a" + }, + "setAuthor": { + "type": "string", + "default": "A" + }, + "addCoAuthor": { + "type": "string", + "default": "c" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingBranchesConfig": { + "properties": { + "createPullRequest": { + "type": "string", + "default": "o" + }, + "viewPullRequestOptions": { + "type": "string", + "default": "O" + }, + "copyPullRequestURL": { + "type": "string", + "default": "\u003cc-y\u003e" + }, + "checkoutBranchByName": { + "type": "string", + "default": "c" + }, + "forceCheckoutBranch": { + "type": "string", + "default": "F" + }, + "checkoutPreviousBranch": { + "type": "string", + "default": "-" + }, + "rebaseBranch": { + "type": "string", + "default": "r" + }, + "renameBranch": { + "type": "string", + "default": "R" + }, + "mergeIntoCurrentBranch": { + "type": "string", + "default": "M" + }, + "moveCommitsToNewBranch": { + "type": "string", + "default": "N" + }, + "viewGitFlowOptions": { + "type": "string", + "default": "i" + }, + "fastForward": { + "type": "string", + "default": "f" + }, + "createTag": { + "type": "string", + "default": "T" + }, + "pushTag": { + "type": "string", + "default": "P" + }, + "setUpstream": { + "type": "string", + "default": "u" + }, + "fetchRemote": { + "type": "string", + "default": "f" + }, + "sortOrder": { + "type": "string", + "default": "s" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingCommitFilesConfig": { + "properties": { + "checkoutCommitFile": { + "type": "string", + "default": "c" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingCommitMessageConfig": { + "properties": { + "commitMenu": { + "type": "string", + "default": "\u003cc-o\u003e" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingCommitsConfig": { + "properties": { + "squashDown": { + "type": "string", + "default": "s" + }, + "renameCommit": { + "type": "string", + "default": "r" + }, + "renameCommitWithEditor": { + "type": "string", + "default": "R" + }, + "viewResetOptions": { + "type": "string", + "default": "g" + }, + "markCommitAsFixup": { + "type": "string", + "default": "f" + }, + "createFixupCommit": { + "type": "string", + "default": "F" + }, + "squashAboveCommits": { + "type": "string", + "default": "S" + }, + "moveDownCommit": { + "type": "string", + "default": "\u003cc-j\u003e" + }, + "moveUpCommit": { + "type": "string", + "default": "\u003cc-k\u003e" + }, + "amendToCommit": { + "type": "string", + "default": "A" + }, + "resetCommitAuthor": { + "type": "string", + "default": "a" + }, + "pickCommit": { + "type": "string", + "default": "p" + }, + "revertCommit": { + "type": "string", + "default": "t" + }, + "cherryPickCopy": { + "type": "string", + "default": "C" + }, + "pasteCommits": { + "type": "string", + "default": "V" + }, + "markCommitAsBaseForRebase": { + "type": "string", + "default": "B" + }, + "tagCommit": { + "type": "string", + "default": "T" + }, + "checkoutCommit": { + "type": "string", + "default": "\u003cspace\u003e" + }, + "resetCherryPick": { + "type": "string", + "default": "\u003cc-R\u003e" + }, + "copyCommitAttributeToClipboard": { + "type": "string", + "default": "y" + }, + "openLogMenu": { + "type": "string", + "default": "\u003cc-l\u003e" + }, + "openInBrowser": { + "type": "string", + "default": "o" + }, + "viewBisectOptions": { + "type": "string", + "default": "b" + }, + "startInteractiveRebase": { + "type": "string", + "default": "i" + }, + "selectCommitsOfCurrentBranch": { + "type": "string", + "default": "*" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingConfig": { + "properties": { + "universal": { + "$ref": "#/$defs/KeybindingUniversalConfig" + }, + "status": { + "$ref": "#/$defs/KeybindingStatusConfig" + }, + "files": { + "$ref": "#/$defs/KeybindingFilesConfig" + }, + "branches": { + "$ref": "#/$defs/KeybindingBranchesConfig" + }, + "worktrees": { + "$ref": "#/$defs/KeybindingWorktreesConfig" + }, + "commits": { + "$ref": "#/$defs/KeybindingCommitsConfig" + }, + "amendAttribute": { + "$ref": "#/$defs/KeybindingAmendAttributeConfig" + }, + "stash": { + "$ref": "#/$defs/KeybindingStashConfig" + }, + "commitFiles": { + "$ref": "#/$defs/KeybindingCommitFilesConfig" + }, + "main": { + "$ref": "#/$defs/KeybindingMainConfig" + }, + "submodules": { + "$ref": "#/$defs/KeybindingSubmodulesConfig" + }, + "commitMessage": { + "$ref": "#/$defs/KeybindingCommitMessageConfig" + } + }, + "additionalProperties": false, + "type": "object", + "description": "Keybindings" + }, + "KeybindingFilesConfig": { + "properties": { + "commitChanges": { + "type": "string", + "default": "c" + }, + "commitChangesWithoutHook": { + "type": "string", + "default": "w" + }, + "amendLastCommit": { + "type": "string", + "default": "A" + }, + "commitChangesWithEditor": { + "type": "string", + "default": "C" + }, + "findBaseCommitForFixup": { + "type": "string", + "default": "\u003cc-f\u003e" + }, + "confirmDiscard": { + "type": "string", + "default": "x" + }, + "ignoreFile": { + "type": "string", + "default": "i" + }, + "refreshFiles": { + "type": "string", + "default": "r" + }, + "stashAllChanges": { + "type": "string", + "default": "s" + }, + "viewStashOptions": { + "type": "string", + "default": "S" + }, + "toggleStagedAll": { + "type": "string", + "default": "a" + }, + "viewResetOptions": { + "type": "string", + "default": "D" + }, + "fetch": { + "type": "string", + "default": "f" + }, + "toggleTreeView": { + "type": "string", + "default": "`" + }, + "openMergeOptions": { + "type": "string", + "default": "M" + }, + "openStatusFilter": { + "type": "string", + "default": "\u003cc-b\u003e" + }, + "copyFileInfoToClipboard": { + "type": "string", + "default": "y" + }, + "collapseAll": { + "type": "string", + "default": "-" + }, + "expandAll": { + "type": "string", + "default": "=" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingMainConfig": { + "properties": { + "toggleSelectHunk": { + "type": "string", + "default": "a" + }, + "pickBothHunks": { + "type": "string", + "default": "b" + }, + "editSelectHunk": { + "type": "string", + "default": "E" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingStashConfig": { + "properties": { + "popStash": { + "type": "string", + "default": "g" + }, + "renameStash": { + "type": "string", + "default": "r" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingStatusConfig": { + "properties": { + "checkForUpdate": { + "type": "string", + "default": "u" + }, + "recentRepos": { + "type": "string", + "default": "\u003center\u003e" + }, + "allBranchesLogGraph": { + "type": "string", + "default": "a" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingSubmodulesConfig": { + "properties": { + "init": { + "type": "string", + "default": "i" + }, + "update": { + "type": "string", + "default": "u" + }, + "bulkMenu": { + "type": "string", + "default": "b" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingUniversalConfig": { + "properties": { + "quit": { + "type": "string", + "default": "q" + }, + "quit-alt1": { + "type": "string", + "default": "\u003cc-c\u003e" + }, + "suspendApp": { + "type": "string", + "default": "\u003cc-z\u003e" + }, + "return": { + "type": "string", + "default": "\u003cesc\u003e" + }, + "quitWithoutChangingDirectory": { + "type": "string", + "default": "Q" + }, + "togglePanel": { + "type": "string", + "default": "\u003ctab\u003e" + }, + "prevItem": { + "type": "string", + "default": "\u003cup\u003e" + }, + "nextItem": { + "type": "string", + "default": "\u003cdown\u003e" + }, + "prevItem-alt": { + "type": "string", + "default": "k" + }, + "nextItem-alt": { + "type": "string", + "default": "j" + }, + "prevPage": { + "type": "string", + "default": "," + }, + "nextPage": { + "type": "string", + "default": "." + }, + "scrollLeft": { + "type": "string", + "default": "H" + }, + "scrollRight": { + "type": "string", + "default": "L" + }, + "gotoTop": { + "type": "string", + "default": "\u003c" + }, + "gotoBottom": { + "type": "string", + "default": "\u003e" + }, + "gotoTop-alt": { + "type": "string", + "default": "\u003chome\u003e" + }, + "gotoBottom-alt": { + "type": "string", + "default": "\u003cend\u003e" + }, + "toggleRangeSelect": { + "type": "string", + "default": "v" + }, + "rangeSelectDown": { + "type": "string", + "default": "\u003cs-down\u003e" + }, + "rangeSelectUp": { + "type": "string", + "default": "\u003cs-up\u003e" + }, + "prevBlock": { + "type": "string", + "default": "\u003cleft\u003e" + }, + "nextBlock": { + "type": "string", + "default": "\u003cright\u003e" + }, + "prevBlock-alt": { + "type": "string", + "default": "h" + }, + "nextBlock-alt": { + "type": "string", + "default": "l" + }, + "nextBlock-alt2": { + "type": "string", + "default": "\u003ctab\u003e" + }, + "prevBlock-alt2": { + "type": "string", + "default": "\u003cbacktab\u003e" + }, + "jumpToBlock": { + "items": { + "type": "string" + }, + "type": "array", + "default": [ + "1", + "2", + "3", + "4", + "5" + ] + }, + "focusMainView": { + "type": "string", + "default": "0" + }, + "nextMatch": { + "type": "string", + "default": "n" + }, + "prevMatch": { + "type": "string", + "default": "N" + }, + "startSearch": { + "type": "string", + "default": "/" + }, + "optionMenu": { + "type": "string", + "default": "\u003cdisabled\u003e" + }, + "optionMenu-alt1": { + "type": "string", + "default": "?" + }, + "select": { + "type": "string", + "default": "\u003cspace\u003e" + }, + "goInto": { + "type": "string", + "default": "\u003center\u003e" + }, + "confirm": { + "type": "string", + "default": "\u003center\u003e" + }, + "confirmMenu": { + "type": "string", + "default": "\u003center\u003e" + }, + "confirmSuggestion": { + "type": "string", + "default": "\u003center\u003e" + }, + "confirmInEditor": { + "type": "string", + "default": "\u003ca-enter\u003e" + }, + "confirmInEditor-alt": { + "type": "string", + "default": "\u003cc-s\u003e" + }, + "remove": { + "type": "string", + "default": "d" + }, + "new": { + "type": "string", + "default": "n" + }, + "edit": { + "type": "string", + "default": "e" + }, + "openFile": { + "type": "string", + "default": "o" + }, + "scrollUpMain": { + "type": "string", + "default": "\u003cpgup\u003e" + }, + "scrollDownMain": { + "type": "string", + "default": "\u003cpgdown\u003e" + }, + "scrollUpMain-alt1": { + "type": "string", + "default": "K" + }, + "scrollDownMain-alt1": { + "type": "string", + "default": "J" + }, + "scrollUpMain-alt2": { + "type": "string", + "default": "\u003cc-u\u003e" + }, + "scrollDownMain-alt2": { + "type": "string", + "default": "\u003cc-d\u003e" + }, + "executeShellCommand": { + "type": "string", + "default": ":" + }, + "createRebaseOptionsMenu": { + "type": "string", + "default": "m" + }, + "pushFiles": { + "type": "string", + "description": "'Files' appended for legacy reasons", + "default": "P" + }, + "pullFiles": { + "type": "string", + "description": "'Files' appended for legacy reasons", + "default": "p" + }, + "refresh": { + "type": "string", + "default": "R" + }, + "createPatchOptionsMenu": { + "type": "string", + "default": "\u003cc-p\u003e" + }, + "nextTab": { + "type": "string", + "default": "]" + }, + "prevTab": { + "type": "string", + "default": "[" + }, + "nextScreenMode": { + "type": "string", + "default": "+" + }, + "prevScreenMode": { + "type": "string", + "default": "_" + }, + "cyclePagers": { + "type": "string", + "default": "|" + }, + "undo": { + "type": "string", + "default": "z" + }, + "redo": { + "type": "string", + "default": "Z" + }, + "filteringMenu": { + "type": "string", + "default": "\u003cc-s\u003e" + }, + "diffingMenu": { + "type": "string", + "default": "W" + }, + "diffingMenu-alt": { + "type": "string", + "default": "\u003cc-e\u003e" + }, + "copyToClipboard": { + "type": "string", + "default": "\u003cc-o\u003e" + }, + "openRecentRepos": { + "type": "string", + "default": "\u003cc-r\u003e" + }, + "submitEditorText": { + "type": "string", + "default": "\u003center\u003e" + }, + "extrasMenu": { + "type": "string", + "default": "@" + }, + "toggleWhitespaceInDiffView": { + "type": "string", + "default": "\u003cc-w\u003e" + }, + "increaseContextInDiffView": { + "type": "string", + "default": "}" + }, + "decreaseContextInDiffView": { + "type": "string", + "default": "{" + }, + "increaseRenameSimilarityThreshold": { + "type": "string", + "default": ")" + }, + "decreaseRenameSimilarityThreshold": { + "type": "string", + "default": "(" + }, + "openDiffTool": { + "type": "string", + "default": "\u003cc-t\u003e" + } + }, + "additionalProperties": false, + "type": "object" + }, + "KeybindingWorktreesConfig": { + "properties": { + "viewWorktreeOptions": { + "type": "string", + "default": "w" + } + }, + "additionalProperties": false, + "type": "object" + }, + "LogConfig": { + "properties": { + "order": { + "type": "string", + "enum": [ + "date-order", + "author-date-order", + "topo-order", + "default" + ], + "description": "One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'\n'topo-order' makes it easier to read the git log graph, but commits may not appear chronologically. See https://git-scm.com/docs/\n\nCan be changed from within Lazygit with `Log menu -\u003e Commit sort order` (`\u003cc-l\u003e` in the commits window by default).", + "default": "topo-order" + }, + "showGraph": { + "type": "string", + "enum": [ + "always", + "never", + "when-maximised" + ], + "description": "This determines whether the git graph is rendered in the commits panel\nOne of 'always' | 'never' | 'when-maximised'\n\nCan be toggled from within lazygit with `Log menu -\u003e Show git graph` (`\u003cc-l\u003e` in the commits window by default).", + "default": "always" + }, + "showWholeGraph": { + "type": "boolean", + "description": "displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)", + "default": false + } + }, + "additionalProperties": false, + "type": "object", + "description": "Config for showing the log in the commits view" + }, + "MergingConfig": { + "properties": { + "manualCommit": { + "type": "boolean", + "description": "If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang\nOnly applicable to unix users.", + "default": false + }, + "args": { + "type": "string", + "description": "Extra args passed to `git merge`, e.g. --no-ff", + "examples": [ + "--no-ff" + ] + }, + "squashMergeMessage": { + "type": "string", + "description": "The commit message to use for a squash merge commit. Can contain \"{{selectedRef}}\" and \"{{currentBranch}}\" placeholders.", + "default": "Squash merge {{selectedRef}} into {{currentBranch}}" + } + }, + "additionalProperties": false, + "type": "object", + "description": "Config relating to merging" + }, + "OSConfig": { + "properties": { + "edit": { + "type": "string", + "description": "Command for editing a file. Should contain \"{{filename}}\"." + }, + "editAtLine": { + "type": "string", + "description": "Command for editing a file at a given line number. Should contain \"{{filename}}\", and may optionally contain \"{{line}}\"." + }, + "editAtLineAndWait": { + "type": "string", + "description": "Same as EditAtLine, except that the command needs to wait until the window is closed." + }, + "editInTerminal": { + "type": "boolean", + "description": "Whether lazygit suspends until an edit process returns" + }, + "openDirInEditor": { + "type": "string", + "description": "For opening a directory in an editor" + }, + "editPreset": { + "type": "string", + "description": "A built-in preset that sets all of the above settings. Supported presets are defined in the getPreset function in editor_presets.go.", + "examples": [ + "vim", + "nvim", + "emacs", + "nano", + "vscode", + "sublime", + "kakoune", + "helix", + "xcode", + "zed", + "acme" + ] + }, + "open": { + "type": "string", + "description": "Command for opening a file, as if the file is double-clicked. Should contain \"{{filename}}\", but doesn't support \"{{line}}\"." + }, + "openLink": { + "type": "string", + "description": "Command for opening a link. Should contain \"{{link}}\"." + }, + "copyToClipboardCmd": { + "type": "string", + "description": "CopyToClipboardCmd is the command for copying to clipboard.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard" + }, + "readFromClipboardCmd": { + "type": "string", + "description": "ReadFromClipboardCmd is the command for reading the clipboard.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard" + }, + "shellFunctionsFile": { + "type": "string", + "description": "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.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#using-aliases-or-functions-in-shell-commands" + } + }, + "additionalProperties": false, + "type": "object", + "description": "Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc" + }, + "PagingConfig": { + "properties": { + "colorArg": { + "type": "string", + "enum": [ + "always", + "never" + ], + "description": "Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'" + }, + "pager": { + "type": "string", + "description": "e.g.\ndiff-so-fancy\ndelta --dark --paging=never\nydiff -p cat -s --wrap --width={{columnWidth}}", + "examples": [ + "delta --dark --paging=never", + "diff-so-fancy", + "ydiff -p cat -s --wrap --width={{columnWidth}}" + ] + }, + "externalDiffCommand": { + "type": "string", + "description": "e.g. 'difft --color=always'" + }, + "useExternalDiffGitConfig": { + "type": "boolean", + "description": "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." + } + }, + "additionalProperties": false, + "type": "object" + }, + "RefresherConfig": { + "properties": { + "refreshInterval": { + "type": "integer", + "minimum": 0, + "description": "File/submodule refresh interval in seconds.\nAuto-refresh can be disabled via option 'git.autoRefresh'.", + "default": 10 + }, + "fetchInterval": { + "type": "integer", + "minimum": 0, + "description": "Re-fetch interval in seconds.\nAuto-fetch can be disabled via option 'git.autoFetch'.", + "default": 60 + } + }, + "additionalProperties": false, + "type": "object", + "description": "Background refreshes" + }, + "SpinnerConfig": { + "properties": { + "frames": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The frames of the spinner animation.", + "default": [ + "|", + "/", + "-", + "\\" + ] + }, + "rate": { + "type": "integer", + "minimum": 1, + "description": "The \"speed\" of the spinner in milliseconds.", + "default": 50 + } + }, + "additionalProperties": false, + "type": "object", + "description": "Config relating to the spinner." + }, + "ThemeConfig": { + "properties": { + "activeBorderColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Border color of focused window", + "default": [ + "green", + "bold" + ] + }, + "inactiveBorderColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Border color of non-focused windows", + "default": [ + "default" + ] + }, + "searchingActiveBorderColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Border color of focused window when searching in that window", + "default": [ + "cyan", + "bold" + ] + }, + "optionsTextColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Color of keybindings help text in the bottom line", + "default": [ + "blue" + ] + }, + "selectedLineBgColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Background color of selected line.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#highlighting-the-selected-line", + "default": [ + "blue" + ] + }, + "inactiveViewSelectedLineBgColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Background color of selected line when view doesn't have focus.", + "default": [ + "bold" + ] + }, + "cherryPickedCommitFgColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Foreground color of copied commit", + "default": [ + "blue" + ] + }, + "cherryPickedCommitBgColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Background color of copied commit", + "default": [ + "cyan" + ] + }, + "markedBaseCommitFgColor": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Foreground color of marked base commit (for rebase)", + "default": [ + "blue" + ] + }, + "markedBaseCommitBgColor": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Background color of marked base commit (for rebase)", + "default": [ + "yellow" + ] + }, + "unstagedChangesColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Color for file with unstaged changes", + "default": [ + "red" + ] + }, + "defaultFgColor": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "description": "Default text color", + "default": [ + "default" + ] + } + }, + "additionalProperties": false, + "type": "object", + "description": "Config relating to colors and styles.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes" + }, + "UpdateConfig": { + "properties": { + "method": { + "type": "string", + "enum": [ + "prompt", + "background", + "never" + ], + "description": "One of: 'prompt' (default) | 'background' | 'never'", + "default": "prompt" + }, + "days": { + "type": "integer", + "minimum": 0, + "description": "Period in days between update checks", + "default": 14 + } + }, + "additionalProperties": false, + "type": "object", + "description": "Periodic update checks" + }, + "UserConfig": { + "properties": { + "gui": { + "$ref": "#/$defs/GuiConfig", + "description": "Config relating to the Lazygit UI" + }, + "git": { + "$ref": "#/$defs/GitConfig", + "description": "Config relating to git" + }, + "update": { + "$ref": "#/$defs/UpdateConfig", + "description": "Periodic update checks" + }, + "refresher": { + "$ref": "#/$defs/RefresherConfig", + "description": "Background refreshes" + }, + "confirmOnQuit": { + "type": "boolean", + "description": "If true, show a confirmation popup before quitting Lazygit", + "default": false + }, + "quitOnTopLevelReturn": { + "type": "boolean", + "description": "If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close", + "default": false + }, + "os": { + "$ref": "#/$defs/OSConfig", + "description": "Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc" + }, + "disableStartupPopups": { + "type": "boolean", + "description": "If true, don't display introductory popups upon opening Lazygit.", + "default": false + }, + "customCommands": { + "items": { + "$ref": "#/$defs/CustomCommand" + }, + "type": "array", + "uniqueItems": true, + "description": "User-configured commands that can be invoked from within Lazygit\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Command_Keybindings.md" + }, + "services": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-pull-request-urls" + }, + "notARepository": { + "type": "string", + "enum": [ + "prompt", + "create", + "skip", + "quit" + ], + "description": "What to do when opening Lazygit outside of a git repo.\n- 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo\n- 'create': initialize a new repo\n- 'skip': open most recent repo\n- 'quit': exit Lazygit", + "default": "prompt" + }, + "promptToReturnFromSubprocess": { + "type": "boolean", + "description": "If true, display a confirmation when subprocess terminates. This allows you to view the output of the subprocess before returning to Lazygit.", + "default": true + }, + "keybinding": { + "$ref": "#/$defs/KeybindingConfig", + "description": "Keybindings" + } + }, + "additionalProperties": false, + "type": "object" + } + } +} diff --git a/scripts/update_docs_for_release.sh b/scripts/update_docs_for_release.sh new file mode 100755 index 00000000000..f37e36091b2 --- /dev/null +++ b/scripts/update_docs_for_release.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +set -euo pipefail + +st=$(git status --porcelain) +if [ -n "$st" ]; then + echo "Working directory is not clean; aborting." + exit 1 +fi + +if diff -r -q docs docs-master > /dev/null && diff -r -q schema schema-master > /dev/null; then + echo "No changes to docs or schema; nothing to do." + exit 0 +fi + +branch_name=update-docs-for-release + +if git show-ref --verify --quiet refs/heads/"$branch_name"; then + echo "Branch '$branch_name' already exists; aborting." + exit 1 +fi + +git checkout -b "$branch_name" --no-track origin/master + +git rm -r docs schema +cp -r docs-master docs +cp -r schema-master schema +git add docs schema +git commit -m "Update docs and schema for release" + +git push -u origin "$branch_name"