1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-27 12:32:37 +02:00

Make it easy to create "amend!" commits

To support this, we turn the confirmation prompt of the "Create fixup commit"
command into a menu; creating a fixup commit is the first entry, so that
"shift-F, enter" behaves the same as before. But there are additional entries
for creating "amend!" commits, either with or without file changes. These make
it easy to reword commit messages of existing commits.
This commit is contained in:
Stefan Haller 2024-03-18 20:21:49 +01:00
parent c92e9d9bdc
commit 150cc70698
16 changed files with 707 additions and 505 deletions

View File

@ -27,6 +27,19 @@ creates a commit with the appropriate subject line.
Don't confuse this with the lowercase "f" command ("Fixup commit"); that one 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. 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 ## Squashing fixup commits
When you're ready to merge the branch and want to squash all these fixup commits When you're ready to merge the branch and want to squash all these fixup commits

View File

@ -297,6 +297,21 @@ func (self *CommitCommands) CreateFixupCommit(sha string) error {
return self.cmd.New(cmdArgs).Run() return self.cmd.New(cmdArgs).Run()
} }
// CreateAmendCommit creates a commit that changes the commit message of a previous commit
func (self *CommitCommands) CreateAmendCommit(originalSubject, newSubject, newDescription string, includeFileChanges bool) error {
description := newSubject
if newDescription != "" {
description += "\n\n" + newDescription
}
cmdArgs := NewGitCmd("commit").
Arg("-m", "amend! "+originalSubject).
Arg("-m", description).
ArgIf(!includeFileChanges, "--only", "--allow-empty").
ToArgv()
return self.cmd.New(cmdArgs).Run()
}
// a value of 0 means the head commit, 1 is the parent commit, etc // a value of 0 means the head commit, 1 is the parent commit, etc
func (self *CommitCommands) GetCommitMessageFromHistory(value int) (string, error) { func (self *CommitCommands) GetCommitMessageFromHistory(value int) (string, error) {
cmdArgs := NewGitCmd("log").Arg("-1", fmt.Sprintf("--skip=%d", value), "--pretty=%H"). cmdArgs := NewGitCmd("log").Arg("-1", fmt.Sprintf("--skip=%d", value), "--pretty=%H").

View File

@ -180,6 +180,57 @@ func TestCommitCreateFixupCommit(t *testing.T) {
} }
} }
func TestCommitCreateAmendCommit(t *testing.T) {
type scenario struct {
testName string
originalSubject string
newSubject string
newDescription string
includeFileChanges bool
runner *oscommands.FakeCmdObjRunner
}
scenarios := []scenario{
{
testName: "subject only",
originalSubject: "original subject",
newSubject: "new subject",
newDescription: "",
includeFileChanges: true,
runner: oscommands.NewFakeRunner(t).
ExpectGitArgs([]string{"commit", "-m", "amend! original subject", "-m", "new subject"}, "", nil),
},
{
testName: "subject and description",
originalSubject: "original subject",
newSubject: "new subject",
newDescription: "new description",
includeFileChanges: true,
runner: oscommands.NewFakeRunner(t).
ExpectGitArgs([]string{"commit", "-m", "amend! original subject", "-m", "new subject\n\nnew description"}, "", nil),
},
{
testName: "without file changes",
originalSubject: "original subject",
newSubject: "new subject",
newDescription: "",
includeFileChanges: false,
runner: oscommands.NewFakeRunner(t).
ExpectGitArgs([]string{"commit", "-m", "amend! original subject", "-m", "new subject", "--only", "--allow-empty"}, "", nil),
},
}
for _, s := range scenarios {
s := s
t.Run(s.testName, func(t *testing.T) {
instance := buildCommitCommands(commonDeps{runner: s.runner})
err := instance.CreateAmendCommit(s.originalSubject, s.newSubject, s.newDescription, s.includeFileChanges)
assert.NoError(t, err)
s.runner.CheckForMissingCalls()
})
}
}
func TestCommitShowCmdObj(t *testing.T) { func TestCommitShowCmdObj(t *testing.T) {
type scenario struct { type scenario struct {
testName string testName string

View File

@ -832,30 +832,87 @@ func (self *LocalCommitsController) afterRevertCommit() error {
} }
func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) error { func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) error {
prompt := utils.ResolvePlaceholderString( var disabledReasonWhenFilesAreNeeded *types.DisabledReason
self.c.Tr.SureCreateFixupCommit, if len(self.c.Model().Files) == 0 {
map[string]string{ disabledReasonWhenFilesAreNeeded = &types.DisabledReason{
"commit": commit.Sha, Text: self.c.Tr.NoFilesStagedTitle,
}, ShowErrorInPanel: true,
) }
}
return self.c.Confirm(types.ConfirmOpts{ return self.c.Menu(types.CreateMenuOptions{
Title: self.c.Tr.CreateFixupCommit, Title: self.c.Tr.CreateFixupCommit,
Prompt: prompt, Items: []*types.MenuItem{
HandleConfirm: func() error { {
return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { Label: self.c.Tr.FixupMenu_Fixup,
Key: 'f',
OnPress: func() error {
return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error {
self.c.LogAction(self.c.Tr.Actions.CreateFixupCommit)
return self.c.WithWaitingStatusSync(self.c.Tr.CreatingFixupCommitStatus, func() error {
if err := self.c.Git().Commit.CreateFixupCommit(commit.Sha); err != nil {
return self.c.Error(err)
}
self.context().MoveSelectedLine(1)
return self.c.Refresh(types.RefreshOptions{Mode: types.SYNC})
})
})
},
DisabledReason: disabledReasonWhenFilesAreNeeded,
Tooltip: self.c.Tr.FixupMenu_FixupTooltip,
},
{
Label: self.c.Tr.FixupMenu_AmendWithChanges,
Key: 'a',
OnPress: func() error {
return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error {
return self.createAmendCommit(commit, true)
})
},
DisabledReason: disabledReasonWhenFilesAreNeeded,
Tooltip: self.c.Tr.FixupMenu_AmendWithChangesTooltip,
},
{
Label: self.c.Tr.FixupMenu_AmendWithoutChanges,
Key: 'r',
OnPress: func() error { return self.createAmendCommit(commit, false) },
Tooltip: self.c.Tr.FixupMenu_AmendWithoutChangesTooltip,
},
},
})
}
func (self *LocalCommitsController) createAmendCommit(commit *models.Commit, includeFileChanges bool) error {
commitMessage, err := self.c.Git().Commit.GetCommitMessage(commit.Sha)
if err != nil {
return self.c.Error(err)
}
if self.c.UserConfig.Git.Commit.AutoWrapCommitMessage {
commitMessage = helpers.TryRemoveHardLineBreaks(commitMessage, self.c.UserConfig.Git.Commit.AutoWrapWidth)
}
originalSubject, _, _ := strings.Cut(commitMessage, "\n")
return self.c.Helpers().Commits.OpenCommitMessagePanel(
&helpers.OpenCommitMessagePanelOpts{
CommitIndex: self.context().GetSelectedLineIdx(),
InitialMessage: commitMessage,
SummaryTitle: self.c.Tr.CreateAmendCommit,
DescriptionTitle: self.c.Tr.CommitDescriptionTitle,
PreserveMessage: false,
OnConfirm: func(summary string, description string) error {
self.c.LogAction(self.c.Tr.Actions.CreateFixupCommit) self.c.LogAction(self.c.Tr.Actions.CreateFixupCommit)
return self.c.WithWaitingStatusSync(self.c.Tr.CreatingFixupCommitStatus, func() error { return self.c.WithWaitingStatusSync(self.c.Tr.CreatingFixupCommitStatus, func() error {
if err := self.c.Git().Commit.CreateFixupCommit(commit.Sha); err != nil { if err := self.c.Git().Commit.CreateAmendCommit(originalSubject, summary, description, includeFileChanges); err != nil {
return self.c.Error(err) return self.c.Error(err)
} }
self.context().MoveSelectedLine(1) self.context().MoveSelectedLine(1)
return self.c.Refresh(types.RefreshOptions{Mode: types.SYNC}) return self.c.Refresh(types.RefreshOptions{Mode: types.SYNC})
}) })
}) },
OnSwitchToEditor: nil,
}, },
}) )
} }
func (self *LocalCommitsController) squashFixupCommits() error { func (self *LocalCommitsController) squashFixupCommits() error {

View File

@ -254,7 +254,6 @@ func chineseTranslationSet() TranslationSet {
CreateFixupCommit: `为此提交创建修正`, CreateFixupCommit: `为此提交创建修正`,
SquashAboveCommitsTooltip: `压缩在所选提交之上的所有“fixup!”提交(自动压缩)`, SquashAboveCommitsTooltip: `压缩在所选提交之上的所有“fixup!”提交(自动压缩)`,
CreateFixupCommitTooltip: `创建修正提交`, CreateFixupCommitTooltip: `创建修正提交`,
SureCreateFixupCommit: `您确定要对 {{.commit}} 创建修正提交吗?`,
ExecuteCustomCommand: "执行自定义命令", ExecuteCustomCommand: "执行自定义命令",
CustomCommand: "自定义命令:", CustomCommand: "自定义命令:",
CommitChangesWithoutHook: "提交更改而无需预先提交钩子", CommitChangesWithoutHook: "提交更改而无需预先提交钩子",

View File

@ -217,7 +217,6 @@ func dutchTranslationSet() TranslationSet {
CreateFixupCommit: `Creëer fixup commit`, CreateFixupCommit: `Creëer fixup commit`,
SquashAboveCommitsTooltip: `Squash bovenstaande commits`, SquashAboveCommitsTooltip: `Squash bovenstaande commits`,
CreateFixupCommitTooltip: `Creëer fixup commit`, CreateFixupCommitTooltip: `Creëer fixup commit`,
SureCreateFixupCommit: `Weet je zeker dat je een fixup wil maken! commit voor commit {{.commit}}?`,
ExecuteCustomCommand: "Voer aangepaste commando uit", ExecuteCustomCommand: "Voer aangepaste commando uit",
CustomCommand: "Aangepaste commando:", CustomCommand: "Aangepaste commando:",
CommitChangesWithoutHook: "Commit veranderingen zonder pre-commit hook", CommitChangesWithoutHook: "Commit veranderingen zonder pre-commit hook",

View File

@ -392,6 +392,13 @@ type TranslationSet struct {
FileResetOptionsTooltip string FileResetOptionsTooltip string
CreateFixupCommit string CreateFixupCommit string
CreateFixupCommitTooltip string CreateFixupCommitTooltip string
CreateAmendCommit string
FixupMenu_Fixup string
FixupMenu_FixupTooltip string
FixupMenu_AmendWithChanges string
FixupMenu_AmendWithChangesTooltip string
FixupMenu_AmendWithoutChanges string
FixupMenu_AmendWithoutChangesTooltip string
SquashAboveCommitsTooltip string SquashAboveCommitsTooltip string
SquashCommitsAboveSelectedTooltip string SquashCommitsAboveSelectedTooltip string
SquashCommitsInCurrentBranchTooltip string SquashCommitsInCurrentBranchTooltip string
@ -399,7 +406,6 @@ type TranslationSet struct {
SquashCommitsInCurrentBranch string SquashCommitsInCurrentBranch string
SquashCommitsAboveSelectedCommit string SquashCommitsAboveSelectedCommit string
CannotSquashCommitsInCurrentBranch string CannotSquashCommitsInCurrentBranch string
SureCreateFixupCommit string
ExecuteCustomCommand string ExecuteCustomCommand string
ExecuteCustomCommandTooltip string ExecuteCustomCommandTooltip string
CustomCommand string CustomCommand string
@ -968,485 +974,491 @@ for up-to-date information how to configure your editor.
// exporting this so we can use it in tests // exporting this so we can use it in tests
func EnglishTranslationSet() TranslationSet { func EnglishTranslationSet() TranslationSet {
return TranslationSet{ return TranslationSet{
NotEnoughSpace: "Not enough space to render panels", NotEnoughSpace: "Not enough space to render panels",
DiffTitle: "Diff", DiffTitle: "Diff",
FilesTitle: "Files", FilesTitle: "Files",
BranchesTitle: "Branches", BranchesTitle: "Branches",
CommitsTitle: "Commits", CommitsTitle: "Commits",
StashTitle: "Stash", StashTitle: "Stash",
SnakeTitle: "Snake", SnakeTitle: "Snake",
EasterEgg: "Easter egg", EasterEgg: "Easter egg",
UnstagedChanges: "Unstaged changes", UnstagedChanges: "Unstaged changes",
StagedChanges: "Staged changes", StagedChanges: "Staged changes",
MainTitle: "Main", MainTitle: "Main",
MergeConfirmTitle: "Merge", MergeConfirmTitle: "Merge",
StagingTitle: "Main panel (staging)", StagingTitle: "Main panel (staging)",
MergingTitle: "Main panel (merging)", MergingTitle: "Main panel (merging)",
NormalTitle: "Main panel (normal)", NormalTitle: "Main panel (normal)",
LogTitle: "Log", LogTitle: "Log",
CommitSummary: "Commit summary", CommitSummary: "Commit summary",
CredentialsUsername: "Username", CredentialsUsername: "Username",
CredentialsPassword: "Password", CredentialsPassword: "Password",
CredentialsPassphrase: "Enter passphrase for SSH key", CredentialsPassphrase: "Enter passphrase for SSH key",
CredentialsPIN: "Enter PIN for SSH key", CredentialsPIN: "Enter PIN for SSH key",
PassUnameWrong: "Password, passphrase and/or username wrong", PassUnameWrong: "Password, passphrase and/or username wrong",
Commit: "Commit", Commit: "Commit",
CommitTooltip: "Commit staged changes.", CommitTooltip: "Commit staged changes.",
AmendLastCommit: "Amend last commit", AmendLastCommit: "Amend last commit",
AmendLastCommitTitle: "Amend last commit", AmendLastCommitTitle: "Amend last commit",
SureToAmend: "Are you sure you want to amend last commit? Afterwards, you can change the commit message from the commits panel.", SureToAmend: "Are you sure you want to amend last commit? Afterwards, you can change the commit message from the commits panel.",
NoCommitToAmend: "There's no commit to amend.", NoCommitToAmend: "There's no commit to amend.",
CommitChangesWithEditor: "Commit changes using git editor", CommitChangesWithEditor: "Commit changes using git editor",
FindBaseCommitForFixup: "Find base commit for fixup", FindBaseCommitForFixup: "Find base commit for fixup",
FindBaseCommitForFixupTooltip: "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: <https://github.com/jesseduffield/lazygit/tree/master/docs/Fixup_Commits.md>", FindBaseCommitForFixupTooltip: "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: <https://github.com/jesseduffield/lazygit/tree/master/docs/Fixup_Commits.md>",
NoDeletedLinesInDiff: "No deleted lines in diff", NoDeletedLinesInDiff: "No deleted lines in diff",
NoBaseCommitsFound: "No base commits found", NoBaseCommitsFound: "No base commits found",
MultipleBaseCommitsFoundStaged: "Multiple base commits found. (Try staging fewer changes at once)", MultipleBaseCommitsFoundStaged: "Multiple base commits found. (Try staging fewer changes at once)",
MultipleBaseCommitsFoundUnstaged: "Multiple base commits found. (Try staging some of the changes)", MultipleBaseCommitsFoundUnstaged: "Multiple base commits found. (Try staging some of the changes)",
BaseCommitIsAlreadyOnMainBranch: "The base commit for this change is already on the main branch", BaseCommitIsAlreadyOnMainBranch: "The base commit for this change is already on the main branch",
BaseCommitIsNotInCurrentView: "Base commit is not in current view", BaseCommitIsNotInCurrentView: "Base commit is not in current view",
HunksWithOnlyAddedLinesWarning: "There are ranges of only added lines in the diff; be careful to check that these belong in the found base commit.\n\nProceed?", HunksWithOnlyAddedLinesWarning: "There are ranges of only added lines in the diff; be careful to check that these belong in the found base commit.\n\nProceed?",
StatusTitle: "Status", StatusTitle: "Status",
Menu: "Menu", Menu: "Menu",
Execute: "Execute", Execute: "Execute",
Stage: "Stage", Stage: "Stage",
StageTooltip: "Toggle staged for selected file.", StageTooltip: "Toggle staged for selected file.",
ToggleStagedAll: "Stage all", ToggleStagedAll: "Stage all",
ToggleStagedAllTooltip: "Toggle staged/unstaged for all files in working tree.", ToggleStagedAllTooltip: "Toggle staged/unstaged for all files in working tree.",
ToggleTreeView: "Toggle file tree view", ToggleTreeView: "Toggle file tree view",
ToggleTreeViewTooltip: "Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.", ToggleTreeViewTooltip: "Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.",
OpenDiffTool: "Open external diff tool (git difftool)", OpenDiffTool: "Open external diff tool (git difftool)",
OpenMergeTool: "Open external merge tool", OpenMergeTool: "Open external merge tool",
OpenMergeToolTooltip: "Run `git mergetool`.", OpenMergeToolTooltip: "Run `git mergetool`.",
Refresh: "Refresh", Refresh: "Refresh",
RefreshTooltip: "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`.", RefreshTooltip: "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`.",
Push: "Push", Push: "Push",
PushTooltip: "Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch.", PushTooltip: "Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch.",
Pull: "Pull", Pull: "Pull",
PullTooltip: "Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch.", PullTooltip: "Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch.",
Scroll: "Scroll", Scroll: "Scroll",
MergeConflictsTitle: "Merge conflicts", MergeConflictsTitle: "Merge conflicts",
Checkout: "Checkout", Checkout: "Checkout",
CheckoutTooltip: "Checkout selected item.", CheckoutTooltip: "Checkout selected item.",
CantCheckoutBranchWhilePulling: "You cannot checkout another branch while pulling the current branch", CantCheckoutBranchWhilePulling: "You cannot checkout another branch while pulling the current branch",
TagCheckoutTooltip: "Checkout the selected tag tag as a detached HEAD.", TagCheckoutTooltip: "Checkout the selected tag tag as a detached HEAD.",
RemoteBranchCheckoutTooltip: "Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head.", RemoteBranchCheckoutTooltip: "Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head.",
CantPullOrPushSameBranchTwice: "You cannot push or pull a branch while it is already being pushed or pulled", CantPullOrPushSameBranchTwice: "You cannot push or pull a branch while it is already being pushed or pulled",
FileFilter: "Filter files by status", FileFilter: "Filter files by status",
CopyToClipboardMenu: "Copy to clipboard", CopyToClipboardMenu: "Copy to clipboard",
CopyFileName: "File name", CopyFileName: "File name",
CopyFilePath: "Path", CopyFilePath: "Path",
CopyFileDiffTooltip: "If there are staged items, this command considers only them. Otherwise, it considers all the unstaged ones.", CopyFileDiffTooltip: "If there are staged items, this command considers only them. Otherwise, it considers all the unstaged ones.",
CopySelectedDiff: "Diff of selected file", CopySelectedDiff: "Diff of selected file",
CopyAllFilesDiff: "Diff of all files", CopyAllFilesDiff: "Diff of all files",
NoContentToCopyError: "Nothing to copy", NoContentToCopyError: "Nothing to copy",
FileNameCopiedToast: "File name copied to clipboard", FileNameCopiedToast: "File name copied to clipboard",
FilePathCopiedToast: "File path copied to clipboard", FilePathCopiedToast: "File path copied to clipboard",
FileDiffCopiedToast: "File diff copied to clipboard", FileDiffCopiedToast: "File diff copied to clipboard",
AllFilesDiffCopiedToast: "All files diff copied to clipboard", AllFilesDiffCopiedToast: "All files diff copied to clipboard",
FilterStagedFiles: "Show only staged files", FilterStagedFiles: "Show only staged files",
FilterUnstagedFiles: "Show only unstaged files", FilterUnstagedFiles: "Show only unstaged files",
ResetFilter: "Reset filter", ResetFilter: "Reset filter",
NoChangedFiles: "No changed files", NoChangedFiles: "No changed files",
SoftReset: "Soft reset", SoftReset: "Soft reset",
AlreadyCheckedOutBranch: "You have already checked out this branch", AlreadyCheckedOutBranch: "You have already checked out this branch",
SureForceCheckout: "Are you sure you want force checkout? You will lose all local changes", SureForceCheckout: "Are you sure you want force checkout? You will lose all local changes",
ForceCheckoutBranch: "Force checkout branch", ForceCheckoutBranch: "Force checkout branch",
BranchName: "Branch name", BranchName: "Branch name",
NewBranchNameBranchOff: "New branch name (branch is off of '{{.branchName}}')", NewBranchNameBranchOff: "New branch name (branch is off of '{{.branchName}}')",
CantDeleteCheckOutBranch: "You cannot delete the checked out branch!", CantDeleteCheckOutBranch: "You cannot delete the checked out branch!",
DeleteBranchTitle: "Delete branch '{{.selectedBranchName}}'?", DeleteBranchTitle: "Delete branch '{{.selectedBranchName}}'?",
DeleteLocalBranch: "Delete local branch", DeleteLocalBranch: "Delete local branch",
DeleteRemoteBranchOption: "Delete remote branch", DeleteRemoteBranchOption: "Delete remote branch",
DeleteRemoteBranchPrompt: "Are you sure you want to delete the remote branch '{{.selectedBranchName}}' from '{{.upstream}}'?", DeleteRemoteBranchPrompt: "Are you sure you want to delete the remote branch '{{.selectedBranchName}}' from '{{.upstream}}'?",
ForceDeleteBranchTitle: "Force delete branch", ForceDeleteBranchTitle: "Force delete branch",
ForceDeleteBranchMessage: "'{{.selectedBranchName}}' is not fully merged. Are you sure you want to delete it?", ForceDeleteBranchMessage: "'{{.selectedBranchName}}' is not fully merged. Are you sure you want to delete it?",
RebaseBranch: "Rebase", RebaseBranch: "Rebase",
RebaseBranchTooltip: "Rebase the checked-out branch onto the selected branch.", RebaseBranchTooltip: "Rebase the checked-out branch onto the selected branch.",
CantRebaseOntoSelf: "You cannot rebase a branch onto itself", CantRebaseOntoSelf: "You cannot rebase a branch onto itself",
CantMergeBranchIntoItself: "You cannot merge a branch into itself", CantMergeBranchIntoItself: "You cannot merge a branch into itself",
ForceCheckout: "Force checkout", ForceCheckout: "Force checkout",
ForceCheckoutTooltip: "Force checkout selected branch. This will discard all local changes in your working directory before checking out the selected branch.", ForceCheckoutTooltip: "Force checkout selected branch. This will discard all local changes in your working directory before checking out the selected branch.",
CheckoutByName: "Checkout by name", CheckoutByName: "Checkout by name",
CheckoutByNameTooltip: "Checkout by name. In the input box you can enter '-' to switch to the last branch.", CheckoutByNameTooltip: "Checkout by name. In the input box you can enter '-' to switch to the last branch.",
RemoteBranchCheckoutTitle: "Checkout {{.branchName}}", RemoteBranchCheckoutTitle: "Checkout {{.branchName}}",
CheckoutTypeNewBranch: "New local branch", CheckoutTypeNewBranch: "New local branch",
CheckoutTypeNewBranchTooltip: "Checkout the remote branch as a local branch, tracking the remote branch.", CheckoutTypeNewBranchTooltip: "Checkout the remote branch as a local branch, tracking the remote branch.",
CheckoutTypeDetachedHead: "Detached head", CheckoutTypeDetachedHead: "Detached head",
CheckoutTypeDetachedHeadTooltip: "Checkout the remote branch as a detached head, which can be useful if you just want to test the branch but not work on it yourself. You can still create a local branch from it later.", CheckoutTypeDetachedHeadTooltip: "Checkout the remote branch as a detached head, which can be useful if you just want to test the branch but not work on it yourself. You can still create a local branch from it later.",
NewBranch: "New branch", NewBranch: "New branch",
NewBranchFromStashTooltip: "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.", NewBranchFromStashTooltip: "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.",
NoBranchesThisRepo: "No branches for this repo", NoBranchesThisRepo: "No branches for this repo",
CommitWithoutMessageErr: "You cannot commit without a commit message", CommitWithoutMessageErr: "You cannot commit without a commit message",
Close: "Close", Close: "Close",
CloseCancel: "Close/Cancel", CloseCancel: "Close/Cancel",
Confirm: "Confirm", Confirm: "Confirm",
Quit: "Quit", Quit: "Quit",
SquashTooltip: "Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it.", SquashTooltip: "Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it.",
NoCommitsThisBranch: "No commits for this branch", NoCommitsThisBranch: "No commits for this branch",
UpdateRefHere: "Update branch '{{.ref}}' here", UpdateRefHere: "Update branch '{{.ref}}' here",
CannotSquashOrFixupFirstCommit: "There's no commit below to squash into", CannotSquashOrFixupFirstCommit: "There's no commit below to squash into",
Fixup: "Fixup", Fixup: "Fixup",
SureFixupThisCommit: "Are you sure you want to 'fixup' the selected commit(s) into the commit below?", SureFixupThisCommit: "Are you sure you want to 'fixup' the selected commit(s) into the commit below?",
SureSquashThisCommit: "Are you sure you want to squash the selected commit(s) into the commit below?", SureSquashThisCommit: "Are you sure you want to squash the selected commit(s) into the commit below?",
Squash: "Squash", Squash: "Squash",
PickCommitTooltip: "Mark the selected commit to be picked (when mid-rebase). This means that the commit will be retained upon continuing the rebase.", PickCommitTooltip: "Mark the selected commit to be picked (when mid-rebase). This means that the commit will be retained upon continuing the rebase.",
Pick: "Pick", Pick: "Pick",
CantPickDisabledReason: "Cannot pick a commit when not mid-rebase", CantPickDisabledReason: "Cannot pick a commit when not mid-rebase",
Edit: "Edit", Edit: "Edit",
RevertCommit: "Revert commit", RevertCommit: "Revert commit",
Revert: "Revert", Revert: "Revert",
RevertCommitTooltip: "Create a revert commit for the selected commit, which applies the selected commit's changes in reverse.", RevertCommitTooltip: "Create a revert commit for the selected commit, which applies the selected commit's changes in reverse.",
Reword: "Reword", Reword: "Reword",
CommitRewordTooltip: "Reword the selected commit's message.", CommitRewordTooltip: "Reword the selected commit's message.",
DropCommit: "Drop", DropCommit: "Drop",
DropCommitTooltip: "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.", DropCommitTooltip: "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.",
MoveDownCommit: "Move commit down one", MoveDownCommit: "Move commit down one",
MoveUpCommit: "Move commit up one", MoveUpCommit: "Move commit up one",
CannotMoveAnyFurther: "Cannot move any further", CannotMoveAnyFurther: "Cannot move any further",
EditCommit: "Edit (start interactive rebase)", EditCommit: "Edit (start interactive rebase)",
EditCommitTooltip: "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.", EditCommitTooltip: "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.",
AmendCommitTooltip: "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.", AmendCommitTooltip: "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.",
Amend: "Amend", Amend: "Amend",
ResetAuthor: "Reset author", ResetAuthor: "Reset author",
ResetAuthorTooltip: "Reset the commit's author to the currently configured user. This will also renew the author timestamp", ResetAuthorTooltip: "Reset the commit's author to the currently configured user. This will also renew the author timestamp",
SetAuthor: "Set author", SetAuthor: "Set author",
SetAuthorTooltip: "Set the author based on a prompt", SetAuthorTooltip: "Set the author based on a prompt",
AddCoAuthor: "Add co-author", AddCoAuthor: "Add co-author",
AmendCommitAttribute: "Amend commit attribute", AmendCommitAttribute: "Amend commit attribute",
AmendCommitAttributeTooltip: "Set/Reset commit author or set co-author.", AmendCommitAttributeTooltip: "Set/Reset commit author or set co-author.",
SetAuthorPromptTitle: "Set author (must look like 'Name <Email>')", SetAuthorPromptTitle: "Set author (must look like 'Name <Email>')",
AddCoAuthorPromptTitle: "Add co-author (must look like 'Name <Email>')", AddCoAuthorPromptTitle: "Add co-author (must look like 'Name <Email>')",
AddCoAuthorTooltip: "Add co-author using the Github/Gitlab metadata Co-authored-by.", AddCoAuthorTooltip: "Add co-author using the Github/Gitlab metadata Co-authored-by.",
SureResetCommitAuthor: "The author field of this commit will be updated to match the configured user. This also renews the author timestamp. Continue?", SureResetCommitAuthor: "The author field of this commit will be updated to match the configured user. This also renews the author timestamp. Continue?",
RewordCommitEditor: "Reword with editor", RewordCommitEditor: "Reword with editor",
Error: "Error", Error: "Error",
PickHunk: "Pick hunk", PickHunk: "Pick hunk",
PickAllHunks: "Pick all hunks", PickAllHunks: "Pick all hunks",
Undo: "Undo", Undo: "Undo",
UndoReflog: "Undo", UndoReflog: "Undo",
RedoReflog: "Redo", RedoReflog: "Redo",
UndoTooltip: "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.", UndoTooltip: "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.",
RedoTooltip: "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.", RedoTooltip: "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.",
UndoMergeResolveTooltip: "Undo last merge conflict resolution.", UndoMergeResolveTooltip: "Undo last merge conflict resolution.",
DiscardAllTooltip: "Discard both staged and unstaged changes in '{{.path}}'.", DiscardAllTooltip: "Discard both staged and unstaged changes in '{{.path}}'.",
DiscardUnstagedTooltip: "Discard unstaged changes in '{{.path}}'.", DiscardUnstagedTooltip: "Discard unstaged changes in '{{.path}}'.",
Pop: "Pop", Pop: "Pop",
StashPopTooltip: "Apply the stash entry to your working directory and remove the stash entry.", StashPopTooltip: "Apply the stash entry to your working directory and remove the stash entry.",
Drop: "Drop", Drop: "Drop",
StashDropTooltip: "Remove the stash entry from the stash list.", StashDropTooltip: "Remove the stash entry from the stash list.",
Apply: "Apply", Apply: "Apply",
StashApplyTooltip: "Apply the stash entry to your working directory.", StashApplyTooltip: "Apply the stash entry to your working directory.",
NoStashEntries: "No stash entries", NoStashEntries: "No stash entries",
StashDrop: "Stash drop", StashDrop: "Stash drop",
SureDropStashEntry: "Are you sure you want to drop this stash entry?", SureDropStashEntry: "Are you sure you want to drop this stash entry?",
StashPop: "Stash pop", StashPop: "Stash pop",
SurePopStashEntry: "Are you sure you want to pop this stash entry?", SurePopStashEntry: "Are you sure you want to pop this stash entry?",
StashApply: "Stash apply", StashApply: "Stash apply",
SureApplyStashEntry: "Are you sure you want to apply this stash entry?", SureApplyStashEntry: "Are you sure you want to apply this stash entry?",
NoTrackedStagedFilesStash: "You have no tracked/staged files to stash", NoTrackedStagedFilesStash: "You have no tracked/staged files to stash",
NoFilesToStash: "You have no files to stash", NoFilesToStash: "You have no files to stash",
StashChanges: "Stash changes", StashChanges: "Stash changes",
RenameStash: "Rename stash", RenameStash: "Rename stash",
RenameStashPrompt: "Rename stash: {{.stashName}}", RenameStashPrompt: "Rename stash: {{.stashName}}",
OpenConfig: "Open config file", OpenConfig: "Open config file",
EditConfig: "Edit config file", EditConfig: "Edit config file",
ForcePush: "Force push", ForcePush: "Force push",
ForcePushPrompt: "Your branch has diverged from the remote branch. Press {{.cancelKey}} to cancel, or {{.confirmKey}} to force push.", ForcePushPrompt: "Your branch has diverged from the remote branch. Press {{.cancelKey}} to cancel, or {{.confirmKey}} to force push.",
ForcePushDisabled: "Your branch has diverged from the remote branch and you've disabled force pushing", ForcePushDisabled: "Your branch has diverged from the remote branch and you've disabled force pushing",
UpdatesRejected: "Updates were rejected. Please fetch and examine the remote changes before pushing again.", UpdatesRejected: "Updates were rejected. Please fetch and examine the remote changes before pushing again.",
CheckForUpdate: "Check for update", CheckForUpdate: "Check for update",
CheckingForUpdates: "Checking for updates...", CheckingForUpdates: "Checking for updates...",
UpdateAvailableTitle: "Update available!", UpdateAvailableTitle: "Update available!",
UpdateAvailable: "Download and install version {{.newVersion}}?", UpdateAvailable: "Download and install version {{.newVersion}}?",
UpdateInProgressWaitingStatus: "Updating", UpdateInProgressWaitingStatus: "Updating",
UpdateCompletedTitle: "Update completed!", UpdateCompletedTitle: "Update completed!",
UpdateCompleted: "Update has been installed successfully. Restart lazygit for it to take effect.", UpdateCompleted: "Update has been installed successfully. Restart lazygit for it to take effect.",
FailedToRetrieveLatestVersionErr: "Failed to retrieve version information", FailedToRetrieveLatestVersionErr: "Failed to retrieve version information",
OnLatestVersionErr: "You already have the latest version", OnLatestVersionErr: "You already have the latest version",
MajorVersionErr: "New version ({{.newVersion}}) has non-backwards compatible changes compared to the current version ({{.currentVersion}})", MajorVersionErr: "New version ({{.newVersion}}) has non-backwards compatible changes compared to the current version ({{.currentVersion}})",
CouldNotFindBinaryErr: "Could not find any binary at {{.url}}", CouldNotFindBinaryErr: "Could not find any binary at {{.url}}",
UpdateFailedErr: "Update failed: {{.errMessage}}", UpdateFailedErr: "Update failed: {{.errMessage}}",
ConfirmQuitDuringUpdateTitle: "Currently updating", ConfirmQuitDuringUpdateTitle: "Currently updating",
ConfirmQuitDuringUpdate: "An update is in progress. Are you sure you want to quit?", ConfirmQuitDuringUpdate: "An update is in progress. Are you sure you want to quit?",
MergeToolTitle: "Merge tool", MergeToolTitle: "Merge tool",
MergeToolPrompt: "Are you sure you want to open `git mergetool`?", MergeToolPrompt: "Are you sure you want to open `git mergetool`?",
IntroPopupMessage: englishIntroPopupMessage, IntroPopupMessage: englishIntroPopupMessage,
DeprecatedEditConfigWarning: englishDeprecatedEditConfigWarning, DeprecatedEditConfigWarning: englishDeprecatedEditConfigWarning,
GitconfigParseErr: `Gogit failed to parse your gitconfig file due to the presence of unquoted '\' characters. Removing these should fix the issue.`, GitconfigParseErr: `Gogit failed to parse your gitconfig file due to the presence of unquoted '\' characters. Removing these should fix the issue.`,
EditFile: `Edit file`, EditFile: `Edit file`,
EditFileTooltip: "Open file in external editor.", EditFileTooltip: "Open file in external editor.",
OpenFile: `Open file`, OpenFile: `Open file`,
OpenFileTooltip: "Open file in default application.", OpenFileTooltip: "Open file in default application.",
OpenInEditor: "Open in editor", OpenInEditor: "Open in editor",
IgnoreFile: `Add to .gitignore`, IgnoreFile: `Add to .gitignore`,
ExcludeFile: `Add to .git/info/exclude`, ExcludeFile: `Add to .git/info/exclude`,
RefreshFiles: `Refresh files`, RefreshFiles: `Refresh files`,
Merge: `Merge`, Merge: `Merge`,
MergeBranchTooltip: "Merge selected branch into currently checked out branch.", MergeBranchTooltip: "Merge selected branch into currently checked out branch.",
ConfirmQuit: `Are you sure you want to quit?`, ConfirmQuit: `Are you sure you want to quit?`,
SwitchRepo: `Switch to a recent repo`, SwitchRepo: `Switch to a recent repo`,
AllBranchesLogGraph: `Show all branch logs`, AllBranchesLogGraph: `Show all branch logs`,
UnsupportedGitService: `Unsupported git service`, UnsupportedGitService: `Unsupported git service`,
CreatePullRequest: `Create pull request`, CreatePullRequest: `Create pull request`,
CopyPullRequestURL: `Copy pull request URL to clipboard`, CopyPullRequestURL: `Copy pull request URL to clipboard`,
NoBranchOnRemote: `This branch doesn't exist on remote. You need to push it to remote first.`, NoBranchOnRemote: `This branch doesn't exist on remote. You need to push it to remote first.`,
Fetch: `Fetch`, Fetch: `Fetch`,
FetchTooltip: "Fetch changes from remote.", FetchTooltip: "Fetch changes from remote.",
NoAutomaticGitFetchTitle: `No automatic git fetch`, NoAutomaticGitFetchTitle: `No automatic git fetch`,
NoAutomaticGitFetchBody: `Lazygit can't use "git fetch" in a private repo; use 'f' in the files panel to run "git fetch" manually`, NoAutomaticGitFetchBody: `Lazygit can't use "git fetch" in a private repo; use 'f' in the files panel to run "git fetch" manually`,
FileEnter: `Stage lines / Collapse directory`, FileEnter: `Stage lines / Collapse directory`,
FileEnterTooltip: "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.", FileEnterTooltip: "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.",
FileStagingRequirements: `Can only stage individual lines for tracked files`, FileStagingRequirements: `Can only stage individual lines for tracked files`,
StageSelectionTooltip: `Toggle selection staged / unstaged.`, StageSelectionTooltip: `Toggle selection staged / unstaged.`,
DiscardSelection: `Discard`, DiscardSelection: `Discard`,
DiscardSelectionTooltip: "When unstaged change is selected, discard the change using `git reset`. When staged change is selected, unstage the change.", DiscardSelectionTooltip: "When unstaged change is selected, discard the change using `git reset`. When staged change is selected, unstage the change.",
ToggleRangeSelect: "Toggle range select", ToggleRangeSelect: "Toggle range select",
ToggleSelectHunk: "Select hunk", ToggleSelectHunk: "Select hunk",
ToggleSelectHunkTooltip: "Toggle hunk selection mode.", ToggleSelectHunkTooltip: "Toggle hunk selection mode.",
ToggleSelectionForPatch: `Toggle lines in patch`, ToggleSelectionForPatch: `Toggle lines in patch`,
EditHunk: `Edit hunk`, EditHunk: `Edit hunk`,
EditHunkTooltip: "Edit selected hunk in external editor.", EditHunkTooltip: "Edit selected hunk in external editor.",
ToggleStagingView: "Switch view", ToggleStagingView: "Switch view",
ToggleStagingViewTooltip: "Switch to other view (staged/unstaged changes).", ToggleStagingViewTooltip: "Switch to other view (staged/unstaged changes).",
ReturnToFilesPanel: `Return to files panel`, ReturnToFilesPanel: `Return to files panel`,
FastForward: `Fast-forward`, FastForward: `Fast-forward`,
FastForwardTooltip: "Fast-forward selected branch from its upstream.", FastForwardTooltip: "Fast-forward selected branch from its upstream.",
FastForwarding: "Fast-forwarding", FastForwarding: "Fast-forwarding",
FoundConflictsTitle: "Conflicts!", FoundConflictsTitle: "Conflicts!",
ViewConflictsMenuItem: "View conflicts", ViewConflictsMenuItem: "View conflicts",
AbortMenuItem: "Abort the %s", AbortMenuItem: "Abort the %s",
ViewMergeRebaseOptions: "View merge/rebase options", ViewMergeRebaseOptions: "View merge/rebase options",
ViewMergeRebaseOptionsTooltip: "View options to abort/continue/skip the current merge/rebase.", ViewMergeRebaseOptionsTooltip: "View options to abort/continue/skip the current merge/rebase.",
ViewMergeOptions: "View merge options", ViewMergeOptions: "View merge options",
ViewRebaseOptions: "View rebase options", ViewRebaseOptions: "View rebase options",
NotMergingOrRebasing: "You are currently neither rebasing nor merging", NotMergingOrRebasing: "You are currently neither rebasing nor merging",
AlreadyRebasing: "Can't perform this action during a rebase", AlreadyRebasing: "Can't perform this action during a rebase",
RecentRepos: "Recent repositories", RecentRepos: "Recent repositories",
MergeOptionsTitle: "Merge options", MergeOptionsTitle: "Merge options",
RebaseOptionsTitle: "Rebase options", RebaseOptionsTitle: "Rebase options",
CommitSummaryTitle: "Commit summary", CommitSummaryTitle: "Commit summary",
CommitDescriptionTitle: "Commit description", CommitDescriptionTitle: "Commit description",
CommitDescriptionSubTitle: "Press {{.togglePanelKeyBinding}} to toggle focus, {{.commitMenuKeybinding}} to open menu", CommitDescriptionSubTitle: "Press {{.togglePanelKeyBinding}} to toggle focus, {{.commitMenuKeybinding}} to open menu",
LocalBranchesTitle: "Local branches", LocalBranchesTitle: "Local branches",
SearchTitle: "Search", SearchTitle: "Search",
TagsTitle: "Tags", TagsTitle: "Tags",
MenuTitle: "Menu", MenuTitle: "Menu",
CommitMenuTitle: "Commit Menu", CommitMenuTitle: "Commit Menu",
RemotesTitle: "Remotes", RemotesTitle: "Remotes",
RemoteBranchesTitle: "Remote branches", RemoteBranchesTitle: "Remote branches",
PatchBuildingTitle: "Main panel (patch building)", PatchBuildingTitle: "Main panel (patch building)",
InformationTitle: "Information", InformationTitle: "Information",
SecondaryTitle: "Secondary", SecondaryTitle: "Secondary",
ReflogCommitsTitle: "Reflog", ReflogCommitsTitle: "Reflog",
GlobalTitle: "Global keybindings", GlobalTitle: "Global keybindings",
ConflictsResolved: "All merge conflicts resolved. Continue?", ConflictsResolved: "All merge conflicts resolved. Continue?",
Continue: "Continue", Continue: "Continue",
Keybindings: "Keybindings", Keybindings: "Keybindings",
KeybindingsMenuSectionLocal: "Local", KeybindingsMenuSectionLocal: "Local",
KeybindingsMenuSectionGlobal: "Global", KeybindingsMenuSectionGlobal: "Global",
KeybindingsMenuSectionNavigation: "Navigation", KeybindingsMenuSectionNavigation: "Navigation",
RebasingTitle: "Rebase '{{.checkedOutBranch}}' onto '{{.ref}}'", RebasingTitle: "Rebase '{{.checkedOutBranch}}' onto '{{.ref}}'",
RebasingFromBaseCommitTitle: "Rebase '{{.checkedOutBranch}}' from marked base onto '{{.ref}}'", RebasingFromBaseCommitTitle: "Rebase '{{.checkedOutBranch}}' from marked base onto '{{.ref}}'",
SimpleRebase: "Simple rebase", SimpleRebase: "Simple rebase",
InteractiveRebase: "Interactive rebase", InteractiveRebase: "Interactive rebase",
InteractiveRebaseTooltip: "Begin an interactive rebase with a break at the start, so you can update the TODO commits before continuing.", InteractiveRebaseTooltip: "Begin an interactive rebase with a break at the start, so you can update the TODO commits before continuing.",
MustSelectTodoCommits: "When rebasing, this action only works on a selection of TODO commits.", MustSelectTodoCommits: "When rebasing, this action only works on a selection of TODO commits.",
ConfirmMerge: "Are you sure you want to merge '{{.selectedBranch}}' into '{{.checkedOutBranch}}'?", ConfirmMerge: "Are you sure you want to merge '{{.selectedBranch}}' into '{{.checkedOutBranch}}'?",
FwdNoUpstream: "Cannot fast-forward a branch with no upstream", FwdNoUpstream: "Cannot fast-forward a branch with no upstream",
FwdNoLocalUpstream: "Cannot fast-forward a branch whose remote is not registered locally", FwdNoLocalUpstream: "Cannot fast-forward a branch whose remote is not registered locally",
FwdCommitsToPush: "Cannot fast-forward a branch with commits to push", FwdCommitsToPush: "Cannot fast-forward a branch with commits to push",
PullRequestNoUpstream: "Cannot open a pull request for a branch with no upstream", PullRequestNoUpstream: "Cannot open a pull request for a branch with no upstream",
ErrorOccurred: "An error occurred! Please create an issue at", ErrorOccurred: "An error occurred! Please create an issue at",
NoRoom: "Not enough room", NoRoom: "Not enough room",
YouAreHere: "YOU ARE HERE", YouAreHere: "YOU ARE HERE",
YouDied: "YOU DIED!", YouDied: "YOU DIED!",
RewordNotSupported: "Rewording commits while interactively rebasing is not currently supported", RewordNotSupported: "Rewording commits while interactively rebasing is not currently supported",
ChangingThisActionIsNotAllowed: "Changing this kind of rebase todo entry is not allowed", ChangingThisActionIsNotAllowed: "Changing this kind of rebase todo entry is not allowed",
CherryPickCopy: "Copy (cherry-pick)", CherryPickCopy: "Copy (cherry-pick)",
CherryPickCopyTooltip: "Mark commit as copied. Then, within the local commits view, you can press `{{.paste}}` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `{{.escape}}` to cancel the selection.", CherryPickCopyTooltip: "Mark commit as copied. Then, within the local commits view, you can press `{{.paste}}` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `{{.escape}}` to cancel the selection.",
CherryPickCopyRangeTooltip: "Mark commits as copied from the last copied commit to the selected commit.", CherryPickCopyRangeTooltip: "Mark commits as copied from the last copied commit to the selected commit.",
PasteCommits: "Paste (cherry-pick)", PasteCommits: "Paste (cherry-pick)",
SureCherryPick: "Are you sure you want to cherry-pick the copied commits onto this branch?", SureCherryPick: "Are you sure you want to cherry-pick the copied commits onto this branch?",
CherryPick: "Cherry-pick", CherryPick: "Cherry-pick",
CannotCherryPickNonCommit: "Cannot cherry-pick this kind of todo item", CannotCherryPickNonCommit: "Cannot cherry-pick this kind of todo item",
CannotCherryPickMergeCommit: "Cherry-picking merge commits is not supported", CannotCherryPickMergeCommit: "Cherry-picking merge commits is not supported",
Donate: "Donate", Donate: "Donate",
AskQuestion: "Ask Question", AskQuestion: "Ask Question",
PrevLine: "Select previous line", PrevLine: "Select previous line",
NextLine: "Select next line", NextLine: "Select next line",
PrevHunk: "Go to previous hunk", PrevHunk: "Go to previous hunk",
NextHunk: "Go to next hunk", NextHunk: "Go to next hunk",
PrevConflict: "Previous conflict", PrevConflict: "Previous conflict",
NextConflict: "Next conflict", NextConflict: "Next conflict",
SelectPrevHunk: "Previous hunk", SelectPrevHunk: "Previous hunk",
SelectNextHunk: "Next hunk", SelectNextHunk: "Next hunk",
ScrollDown: "Scroll down", ScrollDown: "Scroll down",
ScrollUp: "Scroll up", ScrollUp: "Scroll up",
ScrollUpMainWindow: "Scroll up main window", ScrollUpMainWindow: "Scroll up main window",
ScrollDownMainWindow: "Scroll down main window", ScrollDownMainWindow: "Scroll down main window",
AmendCommitTitle: "Amend commit", AmendCommitTitle: "Amend commit",
AmendCommitPrompt: "Are you sure you want to amend this commit with your staged files?", AmendCommitPrompt: "Are you sure you want to amend this commit with your staged files?",
DropCommitTitle: "Drop commit", DropCommitTitle: "Drop commit",
DropCommitPrompt: "Are you sure you want to drop the selected commit(s)?", DropCommitPrompt: "Are you sure you want to drop the selected commit(s)?",
DropUpdateRefPrompt: "Are you sure you want to delete the selected update-ref todo(s)? This is irreversible except by aborting the rebase.", DropUpdateRefPrompt: "Are you sure you want to delete the selected update-ref todo(s)? This is irreversible except by aborting the rebase.",
PullingStatus: "Pulling", PullingStatus: "Pulling",
PushingStatus: "Pushing", PushingStatus: "Pushing",
FetchingStatus: "Fetching", FetchingStatus: "Fetching",
SquashingStatus: "Squashing", SquashingStatus: "Squashing",
FixingStatus: "Fixing up", FixingStatus: "Fixing up",
DeletingStatus: "Deleting", DeletingStatus: "Deleting",
DroppingStatus: "Dropping", DroppingStatus: "Dropping",
MovingStatus: "Moving", MovingStatus: "Moving",
RebasingStatus: "Rebasing", RebasingStatus: "Rebasing",
MergingStatus: "Merging", MergingStatus: "Merging",
LowercaseRebasingStatus: "rebasing", // lowercase because it shows up in parentheses LowercaseRebasingStatus: "rebasing", // lowercase because it shows up in parentheses
LowercaseMergingStatus: "merging", // lowercase because it shows up in parentheses LowercaseMergingStatus: "merging", // lowercase because it shows up in parentheses
AmendingStatus: "Amending", AmendingStatus: "Amending",
CherryPickingStatus: "Cherry-picking", CherryPickingStatus: "Cherry-picking",
UndoingStatus: "Undoing", UndoingStatus: "Undoing",
RedoingStatus: "Redoing", RedoingStatus: "Redoing",
CheckingOutStatus: "Checking out", CheckingOutStatus: "Checking out",
CommittingStatus: "Committing", CommittingStatus: "Committing",
RevertingStatus: "Reverting", RevertingStatus: "Reverting",
CreatingFixupCommitStatus: "Creating fixup commit", CreatingFixupCommitStatus: "Creating fixup commit",
CommitFiles: "Commit files", CommitFiles: "Commit files",
SubCommitsDynamicTitle: "Commits (%s)", SubCommitsDynamicTitle: "Commits (%s)",
CommitFilesDynamicTitle: "Diff files (%s)", CommitFilesDynamicTitle: "Diff files (%s)",
RemoteBranchesDynamicTitle: "Remote branches (%s)", RemoteBranchesDynamicTitle: "Remote branches (%s)",
ViewItemFiles: "View files", ViewItemFiles: "View files",
ViewItemFilesTooltip: "View the files modified by the selected item.", ViewItemFilesTooltip: "View the files modified by the selected item.",
CommitFilesTitle: "Commit files", CommitFilesTitle: "Commit files",
CheckoutCommitFileTooltip: "Checkout file. This replaces the file in your working tree with the version from the selected commit.", CheckoutCommitFileTooltip: "Checkout file. This replaces the file in your working tree with the version from the selected commit.",
CanOnlyDiscardFromLocalCommits: "Changes can only be discarded from local commits", CanOnlyDiscardFromLocalCommits: "Changes can only be discarded from local commits",
Remove: "Remove", Remove: "Remove",
DiscardOldFileChangeTooltip: "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.", DiscardOldFileChangeTooltip: "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.",
DiscardFileChangesTitle: "Discard file changes", DiscardFileChangesTitle: "Discard file changes",
DiscardFileChangesPrompt: "Are you sure you want to remove changes to the selected file(s) from this commit?\n\nThis action will start a rebase, reverting these file changes. Be aware that if subsequent commits depend on these changes, you may need to resolve conflicts.\nNote: This will also reset any active custom patches.", DiscardFileChangesPrompt: "Are you sure you want to remove changes to the selected file(s) from this commit?\n\nThis action will start a rebase, reverting these file changes. Be aware that if subsequent commits depend on these changes, you may need to resolve conflicts.\nNote: This will also reset any active custom patches.",
DisabledForGPG: "Feature not available for users using GPG", DisabledForGPG: "Feature not available for users using GPG",
CreateRepo: "Not in a git repository. Create a new git repository? (y/n): ", CreateRepo: "Not in a git repository. Create a new git repository? (y/n): ",
BareRepo: "You've attempted to open Lazygit in a bare repo but Lazygit does not yet support bare repos. Open most recent repo? (y/n) ", BareRepo: "You've attempted to open Lazygit in a bare repo but Lazygit does not yet support bare repos. Open most recent repo? (y/n) ",
InitialBranch: "Branch name? (leave empty for git's default): ", InitialBranch: "Branch name? (leave empty for git's default): ",
NoRecentRepositories: "Must open lazygit in a git repository. No valid recent repositories. Exiting.", NoRecentRepositories: "Must open lazygit in a git repository. No valid recent repositories. Exiting.",
IncorrectNotARepository: "The value of 'notARepository' is incorrect. It should be one of 'prompt', 'create', 'skip', or 'quit'.", IncorrectNotARepository: "The value of 'notARepository' is incorrect. It should be one of 'prompt', 'create', 'skip', or 'quit'.",
AutoStashTitle: "Autostash?", AutoStashTitle: "Autostash?",
AutoStashPrompt: "You must stash and pop your changes to bring them across. Do this automatically? (enter/esc)", AutoStashPrompt: "You must stash and pop your changes to bring them across. Do this automatically? (enter/esc)",
StashPrefix: "Auto-stashing changes for ", StashPrefix: "Auto-stashing changes for ",
Discard: "Discard", Discard: "Discard",
DiscardFileChangesTooltip: "View options for discarding changes to the selected file.", DiscardFileChangesTooltip: "View options for discarding changes to the selected file.",
DiscardChangesTitle: "Discard changes", DiscardChangesTitle: "Discard changes",
Cancel: "Cancel", Cancel: "Cancel",
DiscardAllChanges: "Discard all changes", DiscardAllChanges: "Discard all changes",
DiscardUnstagedChanges: "Discard unstaged changes", DiscardUnstagedChanges: "Discard unstaged changes",
DiscardAllChangesToAllFiles: "Nuke working tree", DiscardAllChangesToAllFiles: "Nuke working tree",
DiscardAnyUnstagedChanges: "Discard unstaged changes", DiscardAnyUnstagedChanges: "Discard unstaged changes",
DiscardUntrackedFiles: "Discard untracked files", DiscardUntrackedFiles: "Discard untracked files",
DiscardStagedChanges: "Discard staged changes", DiscardStagedChanges: "Discard staged changes",
HardReset: "Hard reset", HardReset: "Hard reset",
BranchDeleteTooltip: "View delete options for local/remote branch.", BranchDeleteTooltip: "View delete options for local/remote branch.",
TagDeleteTooltip: "View delete options for local/remote tag.", TagDeleteTooltip: "View delete options for local/remote tag.",
Delete: "Delete", Delete: "Delete",
Reset: "Reset", Reset: "Reset",
ResetTooltip: "View reset options (soft/mixed/hard) for resetting onto selected item.", ResetTooltip: "View reset options (soft/mixed/hard) for resetting onto selected item.",
ResetSoftTooltip: "Reset HEAD to the chosen commit, and keep the changes between the current and chosen commit as staged changes.", ResetSoftTooltip: "Reset HEAD to the chosen commit, and keep the changes between the current and chosen commit as staged changes.",
ResetMixedTooltip: "Reset HEAD to the chosen commit, and keep the changes between the current and chosen commit as unstaged changes.", ResetMixedTooltip: "Reset HEAD to the chosen commit, and keep the changes between the current and chosen commit as unstaged changes.",
ResetHardTooltip: "Reset HEAD to the chosen commit, and discard all changes between the current and chosen commit, as well as all current modifications in the working tree.", ResetHardTooltip: "Reset HEAD to the chosen commit, and discard all changes between the current and chosen commit, as well as all current modifications in the working tree.",
ViewResetOptions: `Reset`, ViewResetOptions: `Reset`,
FileResetOptionsTooltip: "View reset options for working tree (e.g. nuking the working tree).", FileResetOptionsTooltip: "View reset options for working tree (e.g. nuking the working tree).",
FixupTooltip: "Meld the selected commit into the commit below it. Similar to fixup, but the selected commit's message will be discarded.", FixupTooltip: "Meld the selected commit into the commit below it. Similar to fixup, but the selected commit's message will be discarded.",
CreateFixupCommit: "Create fixup commit", CreateFixupCommit: "Create fixup commit",
CreateFixupCommitTooltip: "Create 'fixup!' commit for the selected commit. Later on, you can press `{{.squashAbove}}` on this same commit to apply all above fixup commits.", CreateFixupCommitTooltip: "Create 'fixup!' commit for the selected commit. Later on, you can press `{{.squashAbove}}` on this same commit to apply all above fixup commits.",
SquashAboveCommits: "Apply fixup commits", CreateAmendCommit: `Create "amend!" commit`,
SquashAboveCommitsTooltip: `Squash all 'fixup!' commits, either above the selected commit, or all in current branch (autosquash).`, FixupMenu_Fixup: "fixup! commit",
SquashCommitsAboveSelectedTooltip: `Squash all 'fixup!' commits above the selected commit (autosquash).`, FixupMenu_FixupTooltip: "Lets you fixup another commit and keep the original commit's message.",
SquashCommitsInCurrentBranchTooltip: `Squash all 'fixup!' commits in the current branch (autosquash).`, FixupMenu_AmendWithChanges: "amend! commit with changes",
SquashCommitsInCurrentBranch: "In current branch", FixupMenu_AmendWithChangesTooltip: "Lets you fixup another commit and also change its commit message.",
SquashCommitsAboveSelectedCommit: "Above the selected commit", FixupMenu_AmendWithoutChanges: "amend! commit without changes (pure reword)",
CannotSquashCommitsInCurrentBranch: "Cannot squash commits in current branch: the HEAD commit is a merge commit or is present on the main branch.", FixupMenu_AmendWithoutChangesTooltip: "Lets you change the commit message of another commit without changing its content.",
SureCreateFixupCommit: `Are you sure you want to create a fixup! commit for commit {{.commit}}?`, SquashAboveCommits: "Apply fixup commits",
ExecuteCustomCommand: "Execute custom command", SquashAboveCommitsTooltip: `Squash all 'fixup!' commits, either above the selected commit, or all in current branch (autosquash).`,
ExecuteCustomCommandTooltip: "Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands.", SquashCommitsAboveSelectedTooltip: `Squash all 'fixup!' commits above the selected commit (autosquash).`,
CustomCommand: "Custom command:", SquashCommitsInCurrentBranchTooltip: `Squash all 'fixup!' commits in the current branch (autosquash).`,
CommitChangesWithoutHook: "Commit changes without pre-commit hook", SquashCommitsInCurrentBranch: "In current branch",
SkipHookPrefixNotConfigured: "You have not configured a commit message prefix for skipping hooks. Set `git.skipHookPrefix = 'WIP'` in your config", SquashCommitsAboveSelectedCommit: "Above the selected commit",
ResetTo: `Reset to`, CannotSquashCommitsInCurrentBranch: "Cannot squash commits in current branch: the HEAD commit is a merge commit or is present on the main branch.",
PressEnterToReturn: "Press enter to return to lazygit", ExecuteCustomCommand: "Execute custom command",
ViewStashOptions: "View stash options", ExecuteCustomCommandTooltip: "Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands.",
ViewStashOptionsTooltip: "View stash options (e.g. stash all, stash staged, stash unstaged).", CustomCommand: "Custom command:",
Stash: "Stash", CommitChangesWithoutHook: "Commit changes without pre-commit hook",
StashTooltip: "Stash all changes. For other variations of stashing, use the view stash options keybinding.", SkipHookPrefixNotConfigured: "You have not configured a commit message prefix for skipping hooks. Set `git.skipHookPrefix = 'WIP'` in your config",
StashAllChanges: "Stash all changes", ResetTo: `Reset to`,
StashStagedChanges: "Stash staged changes", PressEnterToReturn: "Press enter to return to lazygit",
StashAllChangesKeepIndex: "Stash all changes and keep index", ViewStashOptions: "View stash options",
StashUnstagedChanges: "Stash unstaged changes", ViewStashOptionsTooltip: "View stash options (e.g. stash all, stash staged, stash unstaged).",
StashIncludeUntrackedChanges: "Stash all changes including untracked files", Stash: "Stash",
StashOptions: "Stash options", StashTooltip: "Stash all changes. For other variations of stashing, use the view stash options keybinding.",
NotARepository: "Error: must be run inside a git repository", StashAllChanges: "Stash all changes",
WorkingDirectoryDoesNotExist: "Error: the current working directory does not exist", StashStagedChanges: "Stash staged changes",
Jump: "Jump to panel", StashAllChangesKeepIndex: "Stash all changes and keep index",
ScrollLeftRight: "Scroll left/right", StashUnstagedChanges: "Stash unstaged changes",
ScrollLeft: "Scroll left", StashIncludeUntrackedChanges: "Stash all changes including untracked files",
ScrollRight: "Scroll right", StashOptions: "Stash options",
DiscardPatch: "Discard patch", NotARepository: "Error: must be run inside a git repository",
DiscardPatchConfirm: "You can only build a patch from one commit/stash-entry at a time. Discard current patch?", WorkingDirectoryDoesNotExist: "Error: the current working directory does not exist",
DiscardPatchSameCommitConfirm: "You currently have changes added to a patch for this commit. Discard current patch?", Jump: "Jump to panel",
CantPatchWhileRebasingError: "You cannot build a patch or run patch commands while in a merging or rebasing state", ScrollLeftRight: "Scroll left/right",
ToggleAddToPatch: "Toggle file included in patch", ScrollLeft: "Scroll left",
ToggleAddToPatchTooltip: "Toggle whether the file is included in the custom patch. See {{.doc}}.", ScrollRight: "Scroll right",
ToggleAllInPatch: "Toggle all files", DiscardPatch: "Discard patch",
ToggleAllInPatchTooltip: "Add/remove all commit's files to custom patch. See {{.doc}}.", DiscardPatchConfirm: "You can only build a patch from one commit/stash-entry at a time. Discard current patch?",
UpdatingPatch: "Updating patch", DiscardPatchSameCommitConfirm: "You currently have changes added to a patch for this commit. Discard current patch?",
ViewPatchOptions: "View custom patch options", CantPatchWhileRebasingError: "You cannot build a patch or run patch commands while in a merging or rebasing state",
PatchOptionsTitle: "Patch options", ToggleAddToPatch: "Toggle file included in patch",
NoPatchError: "No patch created yet. To start building a patch, use 'space' on a commit file or enter to add specific lines", ToggleAddToPatchTooltip: "Toggle whether the file is included in the custom patch. See {{.doc}}.",
EmptyPatchError: "Patch is still empty. Add some files or lines to your patch first.", ToggleAllInPatch: "Toggle all files",
EnterCommitFile: "Enter file / Toggle directory collapsed", ToggleAllInPatchTooltip: "Add/remove all commit's files to custom patch. See {{.doc}}.",
EnterCommitFileTooltip: "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.", UpdatingPatch: "Updating patch",
ExitCustomPatchBuilder: `Exit custom patch builder`, ViewPatchOptions: "View custom patch options",
EnterUpstream: `Enter upstream as '<remote> <branchname>'`, PatchOptionsTitle: "Patch options",
InvalidUpstream: "Invalid upstream. Must be in the format '<remote> <branchname>'", NoPatchError: "No patch created yet. To start building a patch, use 'space' on a commit file or enter to add specific lines",
ReturnToRemotesList: `Return to remotes list`, EmptyPatchError: "Patch is still empty. Add some files or lines to your patch first.",
NewRemote: `New remote`, EnterCommitFile: "Enter file / Toggle directory collapsed",
NewRemoteName: `New remote name:`, EnterCommitFileTooltip: "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.",
NewRemoteUrl: `New remote url:`, ExitCustomPatchBuilder: `Exit custom patch builder`,
ViewBranches: "View branches", EnterUpstream: `Enter upstream as '<remote> <branchname>'`,
EditRemoteName: `Enter updated remote name for {{.remoteName}}:`, InvalidUpstream: "Invalid upstream. Must be in the format '<remote> <branchname>'",
EditRemoteUrl: `Enter updated remote url for {{.remoteName}}:`, ReturnToRemotesList: `Return to remotes list`,
RemoveRemote: `Remove remote`, NewRemote: `New remote`,
RemoveRemoteTooltip: `Remove the selected remote. Any local branches tracking a remote branch from the remote will be unaffected.`, NewRemoteName: `New remote name:`,
RemoveRemotePrompt: "Are you sure you want to remove remote", NewRemoteUrl: `New remote url:`,
DeleteRemoteBranch: "Delete remote branch", ViewBranches: "View branches",
DeleteRemoteBranchMessage: "Are you sure you want to delete remote branch", EditRemoteName: `Enter updated remote name for {{.remoteName}}:`,
DeleteRemoteBranchTooltip: "Delete the remote branch from the remote.", EditRemoteUrl: `Enter updated remote url for {{.remoteName}}:`,
SetAsUpstream: "Set as upstream", RemoveRemote: `Remove remote`,
SetAsUpstreamTooltip: "Set the selected remote branch as the upstream of the checked-out branch.", RemoveRemoteTooltip: `Remove the selected remote. Any local branches tracking a remote branch from the remote will be unaffected.`,
SetUpstream: "Set upstream of selected branch", RemoveRemotePrompt: "Are you sure you want to remove remote",
UnsetUpstream: "Unset upstream of selected branch", DeleteRemoteBranch: "Delete remote branch",
ViewDivergenceFromUpstream: "View divergence from upstream", DeleteRemoteBranchMessage: "Are you sure you want to delete remote branch",
DivergenceSectionHeaderLocal: "Local", DeleteRemoteBranchTooltip: "Delete the remote branch from the remote.",
DivergenceSectionHeaderRemote: "Remote", SetAsUpstream: "Set as upstream",
ViewUpstreamResetOptions: "Reset checked-out branch onto {{.upstream}}", SetAsUpstreamTooltip: "Set the selected remote branch as the upstream of the checked-out branch.",
ViewUpstreamResetOptionsTooltip: "View options for resetting the checked-out branch onto {{upstream}}. Note: this will not reset the selected branch onto the upstream, it will reset the checked-out branch onto the upstream.", SetUpstream: "Set upstream of selected branch",
ViewUpstreamRebaseOptions: "Rebase checked-out branch onto {{.upstream}}", UnsetUpstream: "Unset upstream of selected branch",
ViewUpstreamRebaseOptionsTooltip: "View options for rebasing the checked-out branch onto {{upstream}}. Note: this will not rebase the selected branch onto the upstream, it will rebased the checked-out branch onto the upstream.", ViewDivergenceFromUpstream: "View divergence from upstream",
UpstreamGenericName: "upstream of selected branch", DivergenceSectionHeaderLocal: "Local",
SetUpstreamTitle: "Set upstream branch", DivergenceSectionHeaderRemote: "Remote",
SetUpstreamMessage: "Are you sure you want to set the upstream branch of '{{.checkedOut}}' to '{{.selected}}'", ViewUpstreamResetOptions: "Reset checked-out branch onto {{.upstream}}",
EditRemoteTooltip: "Edit the selected remote's name or URL.", ViewUpstreamResetOptionsTooltip: "View options for resetting the checked-out branch onto {{upstream}}. Note: this will not reset the selected branch onto the upstream, it will reset the checked-out branch onto the upstream.",
TagCommit: "Tag commit", ViewUpstreamRebaseOptions: "Rebase checked-out branch onto {{.upstream}}",
TagCommitTooltip: "Create a new tag pointing at the selected commit. You'll be prompted to enter a tag name and optional description.", ViewUpstreamRebaseOptionsTooltip: "View options for rebasing the checked-out branch onto {{upstream}}. Note: this will not rebase the selected branch onto the upstream, it will rebased the checked-out branch onto the upstream.",
TagMenuTitle: "Create tag", UpstreamGenericName: "upstream of selected branch",
TagNameTitle: "Tag name", SetUpstreamTitle: "Set upstream branch",
TagMessageTitle: "Tag description", SetUpstreamMessage: "Are you sure you want to set the upstream branch of '{{.checkedOut}}' to '{{.selected}}'",
AnnotatedTag: "Annotated tag", EditRemoteTooltip: "Edit the selected remote's name or URL.",
LightweightTag: "Lightweight tag", TagCommit: "Tag commit",
DeleteTagTitle: "Delete tag '{{.tagName}}'?", TagCommitTooltip: "Create a new tag pointing at the selected commit. You'll be prompted to enter a tag name and optional description.",
DeleteLocalTag: "Delete local tag", TagMenuTitle: "Create tag",
DeleteRemoteTag: "Delete remote tag", TagNameTitle: "Tag name",
RemoteTagDeletedMessage: "Remote tag deleted", TagMessageTitle: "Tag description",
SelectRemoteTagUpstream: "Remote from which to remove tag '{{.tagName}}':", AnnotatedTag: "Annotated tag",
DeleteRemoteTagPrompt: "Are you sure you want to delete the remote tag '{{.tagName}}' from '{{.upstream}}'?", LightweightTag: "Lightweight tag",
PushTagTitle: "Remote to push tag '{{.tagName}}' to:", DeleteTagTitle: "Delete tag '{{.tagName}}'?",
DeleteLocalTag: "Delete local tag",
DeleteRemoteTag: "Delete remote tag",
RemoteTagDeletedMessage: "Remote tag deleted",
SelectRemoteTagUpstream: "Remote from which to remove tag '{{.tagName}}':",
DeleteRemoteTagPrompt: "Are you sure you want to delete the remote tag '{{.tagName}}' from '{{.upstream}}'?",
PushTagTitle: "Remote to push tag '{{.tagName}}' to:",
// Using 'push tag' rather than just 'push' to disambiguate from a global push // Using 'push tag' rather than just 'push' to disambiguate from a global push
PushTag: "Push tag", PushTag: "Push tag",
PushTagTooltip: "Push the selected tag to a remote. You'll be prompted to select a remote.", PushTagTooltip: "Push the selected tag to a remote. You'll be prompted to select a remote.",

View File

@ -264,7 +264,6 @@ func japaneseTranslationSet() TranslationSet {
// LcSquashAboveCommits: `squash all 'fixup!' commits above selected commit (autosquash)`, // LcSquashAboveCommits: `squash all 'fixup!' commits above selected commit (autosquash)`,
// SquashAboveCommits: `Squash all 'fixup!' commits above selected commit (autosquash)`, // SquashAboveCommits: `Squash all 'fixup!' commits above selected commit (autosquash)`,
CreateFixupCommit: `Fixupコミットを作成`, CreateFixupCommit: `Fixupコミットを作成`,
SureCreateFixupCommit: `{{.commit}} に対する fixup! コミットを作成します。よろしいですか?`,
ExecuteCustomCommand: "カスタムコマンドを実行", ExecuteCustomCommand: "カスタムコマンドを実行",
CustomCommand: "カスタムコマンド:", CustomCommand: "カスタムコマンド:",
CommitChangesWithoutHook: "pre-commitフックを実行せずに変更をコミット", CommitChangesWithoutHook: "pre-commitフックを実行せずに変更をコミット",

View File

@ -258,7 +258,6 @@ func koreanTranslationSet() TranslationSet {
CreateFixupCommitTooltip: `Create fixup commit for this commit`, CreateFixupCommitTooltip: `Create fixup commit for this commit`,
SquashAboveCommitsTooltip: `Squash all 'fixup!' commits above selected commit (autosquash)`, SquashAboveCommitsTooltip: `Squash all 'fixup!' commits above selected commit (autosquash)`,
CreateFixupCommit: `Create fixup commit`, CreateFixupCommit: `Create fixup commit`,
SureCreateFixupCommit: `Are you sure you want to create a fixup! commit for commit {{.commit}}?`,
ExecuteCustomCommand: "Execute custom command", ExecuteCustomCommand: "Execute custom command",
CustomCommand: "Custom command:", CustomCommand: "Custom command:",
CommitChangesWithoutHook: "Commit changes without pre-commit hook", CommitChangesWithoutHook: "Commit changes without pre-commit hook",

View File

@ -390,7 +390,6 @@ func polishTranslationSet() TranslationSet {
SquashCommitsAboveSelectedCommit: "Powyżej wybranego commita", SquashCommitsAboveSelectedCommit: "Powyżej wybranego commita",
CannotSquashCommitsInCurrentBranch: "Nie można scalić commitów w bieżącej gałęzi: commit HEAD jest commit merge lub jest obecny na głównej gałęzi.", CannotSquashCommitsInCurrentBranch: "Nie można scalić commitów w bieżącej gałęzi: commit HEAD jest commit merge lub jest obecny na głównej gałęzi.",
CreateFixupCommit: `Utwórz commit fixup`, CreateFixupCommit: `Utwórz commit fixup`,
SureCreateFixupCommit: `Czy na pewno chcesz utworzyć commit fixup! dla commita {{.commit}}?`,
ExecuteCustomCommand: "Wykonaj polecenie niestandardowe", ExecuteCustomCommand: "Wykonaj polecenie niestandardowe",
ExecuteCustomCommandTooltip: "Wyświetl monit, w którym możesz wprowadzić polecenie powłoki do wykonania. Nie należy mylić z wcześniej skonfigurowanymi poleceniami niestandardowymi.", ExecuteCustomCommandTooltip: "Wyświetl monit, w którym możesz wprowadzić polecenie powłoki do wykonania. Nie należy mylić z wcześniej skonfigurowanymi poleceniami niestandardowymi.",
CustomCommand: "Polecenie niestandardowe:", CustomCommand: "Polecenie niestandardowe:",

View File

@ -311,7 +311,6 @@ func RussianTranslationSet() TranslationSet {
CreateFixupCommitTooltip: `Создать fixup коммит для этого коммита`, CreateFixupCommitTooltip: `Создать fixup коммит для этого коммита`,
SquashAboveCommitsTooltip: `Объединить все 'fixup!' коммиты выше в выбранный коммит (автосохранение)`, SquashAboveCommitsTooltip: `Объединить все 'fixup!' коммиты выше в выбранный коммит (автосохранение)`,
CreateFixupCommit: `Создать fixup коммит`, CreateFixupCommit: `Создать fixup коммит`,
SureCreateFixupCommit: `Вы уверены, что хотите создать fixup! коммит для коммита {{.commit}}?`,
ExecuteCustomCommand: "Выполнить пользовательскую команду", ExecuteCustomCommand: "Выполнить пользовательскую команду",
CustomCommand: "Пользовательская Команда:", CustomCommand: "Пользовательская Команда:",
CommitChangesWithoutHook: "Закоммитить изменения без предварительного хука коммита", CommitChangesWithoutHook: "Закоммитить изменения без предварительного хука коммита",

View File

@ -340,7 +340,6 @@ func traditionalChineseTranslationSet() TranslationSet {
SquashAboveCommits: "壓縮上方所有「fixup」提交(自動壓縮)", SquashAboveCommits: "壓縮上方所有「fixup」提交(自動壓縮)",
SquashAboveCommitsTooltip: "是否壓縮上方 {{.commit}} 所有「fixup」提交?", SquashAboveCommitsTooltip: "是否壓縮上方 {{.commit}} 所有「fixup」提交?",
CreateFixupCommit: "建立修復提交", CreateFixupCommit: "建立修復提交",
SureCreateFixupCommit: "你確定要為提交{{.commit}}建立fixup!提交?",
ExecuteCustomCommand: "執行自訂命令", ExecuteCustomCommand: "執行自訂命令",
CustomCommand: "自訂命令:", CustomCommand: "自訂命令:",
CommitChangesWithoutHook: "沒有預提交 hook 就提交更改", CommitChangesWithoutHook: "沒有預提交 hook 就提交更改",

View File

@ -0,0 +1,60 @@
package commit
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var CreateAmendCommit = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Create an amend commit for an existing commit",
ExtraCmdArgs: []string{},
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
shell.
CreateNCommits(3).
CreateFileAndAdd("fixup-file", "fixup content")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().Commits().
Focus().
Lines(
Contains("commit 03"),
Contains("commit 02"),
Contains("commit 01"),
).
NavigateToLine(Contains("commit 02")).
Press(keys.Commits.CreateFixupCommit).
Tap(func() {
t.ExpectPopup().Menu().
Title(Equals("Create fixup commit")).
Select(Contains("amend! commit with changes")).
Confirm()
t.ExpectPopup().CommitMessagePanel().
Content(Equals("commit 02")).
Type(" amended").Confirm()
}).
Lines(
Contains("amend! commit 02"),
Contains("commit 03"),
Contains("commit 02").IsSelected(),
Contains("commit 01"),
)
if t.Git().Version().IsAtLeast(2, 32, 0) { // Support for auto-squashing "amend!" commits was added in git 2.32.0
t.Views().Commits().
Press(keys.Commits.SquashAboveCommits).
Tap(func() {
t.ExpectPopup().Menu().
Title(Equals("Apply fixup commits")).
Select(Contains("Above the selected commit")).
Confirm()
}).
Lines(
Contains("commit 03"),
Contains("commit 02 amended").IsSelected(),
Contains("commit 01"),
)
}
},
})

View File

@ -26,9 +26,9 @@ var SquashFixupsAbove = NewIntegrationTest(NewIntegrationTestArgs{
NavigateToLine(Contains("commit 02")). NavigateToLine(Contains("commit 02")).
Press(keys.Commits.CreateFixupCommit). Press(keys.Commits.CreateFixupCommit).
Tap(func() { Tap(func() {
t.ExpectPopup().Confirmation(). t.ExpectPopup().Menu().
Title(Equals("Create fixup commit")). Title(Equals("Create fixup commit")).
Content(Contains("Are you sure you want to create a fixup! commit for commit")). Select(Contains("fixup! commit")).
Confirm() Confirm()
}). }).
Lines( Lines(

View File

@ -25,9 +25,9 @@ var SquashFixupsAboveFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{
NavigateToLine(Contains("commit 01")). NavigateToLine(Contains("commit 01")).
Press(keys.Commits.CreateFixupCommit). Press(keys.Commits.CreateFixupCommit).
Tap(func() { Tap(func() {
t.ExpectPopup().Confirmation(). t.ExpectPopup().Menu().
Title(Equals("Create fixup commit")). Title(Equals("Create fixup commit")).
Content(Contains("Are you sure you want to create a fixup! commit for commit")). Select(Contains("fixup! commit")).
Confirm() Confirm()
}). }).
NavigateToLine(Contains("commit 01").DoesNotContain("fixup!")). NavigateToLine(Contains("commit 01").DoesNotContain("fixup!")).

View File

@ -72,6 +72,7 @@ var tests = []*components.IntegrationTest{
commit.CommitSwitchToEditor, commit.CommitSwitchToEditor,
commit.CommitWipWithPrefix, commit.CommitWipWithPrefix,
commit.CommitWithPrefix, commit.CommitWithPrefix,
commit.CreateAmendCommit,
commit.CreateTag, commit.CreateTag,
commit.DiscardOldFileChanges, commit.DiscardOldFileChanges,
commit.FindBaseCommitForFixup, commit.FindBaseCommitForFixup,