summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-03-22 08:32:16 +0100
committerGitHub <noreply@github.com>2024-03-22 08:32:16 +0100
commit28dd7f946752d31487b207ab05338dbf4898042f (patch)
treeb94262cc4b79863afb9340b9379ba39371897bfa
parente23337f8f51532dc4447fc7aaa874dec65130d7a (diff)
parent150cc706981ec6a6e1e4f79f1fbf09cb7af224fd (diff)
Make it easy to create "amend!" commits (#3409)
- **PR Description** 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.
-rw-r--r--docs/Fixup_Commits.md13
-rw-r--r--docs/keybindings/Keybindings_ja.md2
-rw-r--r--docs/keybindings/Keybindings_nl.md2
-rw-r--r--docs/keybindings/Keybindings_ru.md2
-rw-r--r--docs/keybindings/Keybindings_zh-CN.md2
-rw-r--r--docs/keybindings/Keybindings_zh-TW.md2
-rw-r--r--pkg/commands/git_commands/commit.go15
-rw-r--r--pkg/commands/git_commands/commit_test.go51
-rw-r--r--pkg/gui/controllers/local_commits_controller.go85
-rw-r--r--pkg/i18n/chinese.go1
-rw-r--r--pkg/i18n/dutch.go3
-rw-r--r--pkg/i18n/english.go974
-rw-r--r--pkg/i18n/japanese.go1
-rw-r--r--pkg/i18n/korean.go1
-rw-r--r--pkg/i18n/polish.go2
-rw-r--r--pkg/i18n/russian.go1
-rw-r--r--pkg/i18n/traditional_chinese.go1
-rw-r--r--pkg/integration/tests/commit/create_amend_commit.go60
-rw-r--r--pkg/integration/tests/interactive_rebase/squash_fixups_above.go4
-rw-r--r--pkg/integration/tests/interactive_rebase/squash_fixups_above_first_commit.go4
-rw-r--r--pkg/integration/tests/test_list.go1
21 files changed, 713 insertions, 514 deletions
diff --git a/docs/Fixup_Commits.md b/docs/Fixup_Commits.md
index 1d148c546..fde85ee39 100644
--- a/docs/Fixup_Commits.md
+++ b/docs/Fixup_Commits.md
@@ -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
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
diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md
index bcf56e761..863ecddd4 100644
--- a/docs/keybindings/Keybindings_ja.md
+++ b/docs/keybindings/Keybindings_ja.md
@@ -105,7 +105,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| `` 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 | このコミットに対するfixupコミットを作成 |
+| `` F `` | Fixupコミットを作成 | このコミットに対するfixupコミットを作成 |
| `` S `` | Apply fixup commits | Squash all 'fixup!' commits, either above the selected commit, or all in current branch (autosquash). |
| `` <c-j> `` | コミットを1つ下に移動 | |
| `` <c-k> `` | コミットを1つ上に移動 | |
diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md
index a55c1a445..61bc9c414 100644
--- a/docs/keybindings/Keybindings_nl.md
+++ b/docs/keybindings/Keybindings_nl.md
@@ -151,7 +151,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| `` 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 `` | Create fixup commit | Creëer fixup commit |
+| `` F `` | Creëer fixup commit | Creëer fixup commit |
| `` S `` | Apply fixup commits | Squash bovenstaande commits |
| `` <c-j> `` | Verplaats commit 1 naar beneden | |
| `` <c-k> `` | Verplaats commit 1 naar boven | |
diff --git a/docs/keybindings/Keybindings_ru.md b/docs/keybindings/Keybindings_ru.md
index 40ed1e2f4..8eb34a5bb 100644
--- a/docs/keybindings/Keybindings_ru.md
+++ b/docs/keybindings/Keybindings_ru.md
@@ -152,7 +152,7 @@ _Связки клавиш_
| `` 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 `` | Create fixup commit | Создать fixup коммит для этого коммита |
+| `` F `` | Создать fixup коммит | Создать fixup коммит для этого коммита |
| `` S `` | Apply fixup commits | Объединить все 'fixup!' коммиты выше в выбранный коммит (автосохранение) |
| `` <c-j> `` | Переместить коммит вниз на один | |
| `` <c-k> `` | Переместить коммит вверх на один | |
diff --git a/docs/keybindings/Keybindings_zh-CN.md b/docs/keybindings/Keybindings_zh-CN.md
index c622e4bbc..c6d426b7f 100644
--- a/docs/keybindings/Keybindings_zh-CN.md
+++ b/docs/keybindings/Keybindings_zh-CN.md
@@ -149,7 +149,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| `` 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 `` | Create fixup commit | 创建修正提交 |
+| `` F `` | 为此提交创建修正 | 创建修正提交 |
| `` S `` | Apply fixup commits | 压缩在所选提交之上的所有“fixup!”提交(自动压缩) |
| `` <c-j> `` | 下移提交 | |
| `` <c-k> `` | 上移提交 | |
diff --git a/docs/keybindings/Keybindings_zh-TW.md b/docs/keybindings/Keybindings_zh-TW.md
index 118ebec7e..2cb92f88e 100644
--- a/docs/keybindings/Keybindings_zh-TW.md
+++ b/docs/keybindings/Keybindings_zh-TW.md
@@ -174,7 +174,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
| `` 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 `` | Create fixup commit | 為此提交建立修復提交 |
+| `` F `` | 建立修復提交 | 為此提交建立修復提交 |
| `` S `` | 壓縮上方所有「fixup」提交(自動壓縮) | 是否壓縮上方 {{.commit}} 所有「fixup」提交? |
| `` <c-j> `` | 向下移動提交 | |
| `` <c-k> `` | 向上移動提交 | |
diff --git a/pkg/commands/git_commands/commit.go b/pkg/commands/git_commands/commit.go
index 400cd7608..6bf1985e1 100644
--- a/pkg/commands/git_commands/commit.go
+++ b/pkg/commands/git_commands/commit.go
@@ -297,6 +297,21 @@ func (self *CommitCommands) CreateFixupCommit(sha string) error {
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
func (self *CommitCommands) GetCommitMessageFromHistory(value int) (string, error) {
cmdArgs := NewGitCmd("log").Arg("-1", fmt.Sprintf("--skip=%d", value), "--pretty=%H").
diff --git a/pkg/commands/git_commands/commit_test.go b/pkg/commands/git_commands/commit_test.go
index d6e3397e3..8dc8afa83 100644
--- a/pkg/commands/git_commands/commit_test.go
+++ b/pkg/commands/git_commands/commit_test.go
@@ -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) {
type scenario struct {
testName string
diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go
index fe15a37d3..5c4ce2bd0 100644
--- a/pkg/gui/controllers/local_commits_controller.go
+++ b/pkg/gui/controllers/local_commits_controller.go
@@ -157,7 +157,7 @@ func (self *LocalCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
Key: opts.GetKey(opts.Config.Commits.CreateFixupCommit),
Handler: self.withItem(self.createFixupCommit),
GetDisabledReason: self.require(self.singleItemSelected()),
- Description: self.c.Tr.CreateFixupCommitDescription,
+ Description: self.c.Tr.CreateFixupCommit,
Tooltip: utils.ResolvePlaceholderString(
self.c.Tr.CreateFixupCommitTooltip,
map[string]string{
@@ -832,30 +832,87 @@ func (self *LocalCommitsController) afterRevertCommit() error {
}
func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) error {
- prompt := utils.ResolvePlaceholderString(
- self.c.Tr.SureCreateFixupCommit,
- map[string]string{
- "commit": commit.Sha,
+ var disabledReasonWhenFilesAreNeeded *types.DisabledReason
+ if len(self.c.Model().Files) == 0 {
+ disabledReasonWhenFilesAreNeeded = &types.DisabledReason{
+ Text: self.c.Tr.NoFilesStagedTitle,
+ ShowErrorInPanel: true,
+ }
+ }
+
+ return self.c.Menu(types.CreateMenuOptions{
+ Title: self.c.Tr.CreateFixupCommit,
+ Items: []*types.MenuItem{
+ {
+ 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,
+ },
},
- )
+ })
+}
- return self.c.Confirm(types.ConfirmOpts{
- Title: self.c.Tr.CreateFixupCommit,
- Prompt: prompt,
- HandleConfirm: func() error {
- return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error {
+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)
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)
}
self.context().MoveSelectedLine(1)
return self.c.Refresh(types.RefreshOptions{Mode: types.SYNC})
})
- })
+ },
+ OnSwitchToEditor: nil,
},
- })
+ )
}
func (self *LocalCommitsController) squashFixupCommits() error {
diff --git a/pkg/i18n/chinese.go b/pkg/i18n/chinese.go
index 3d3c14021..5648c922f 100644
--- a/pkg/i18n/chinese.go
+++ b/pkg/i18n/chinese.go
@@ -254,7 +254,6 @@ func chineseTranslationSet() TranslationSet {
CreateFixupCommit: `为此提交创建修正`,
SquashAboveCommitsTooltip: `压缩在所选提交之上的所有“fixup!”提交(自动压缩)`,
CreateFixupCommitTooltip: `创建修正提交`,
- SureCreateFixupCommit: `您确定要对 {{.commit}} 创建修正提交吗?`,
ExecuteCustomCommand: "执行自定义命令",
CustomCommand: "自定义命令:",
CommitChangesWithoutHook: "提交更改而无需预先提交钩子",
diff --git a/pkg/i18n/dutch.go b/pkg/i18n/dutch.go
index b785dddee..99ff50e06 100644
--- a/pkg/i18n/dutch.go
+++ b/pkg/i18n/dutch.go
@@ -214,10 +214,9 @@ func dutchTranslationSet() TranslationSet {
DiscardUntrackedFiles: "Negeer niet-gevonden bestanden",
ViewResetOptions: `Bekijk reset opties`,
HardReset: "Harde reset",
- CreateFixupCommit: `Creëer fixup commit voor deze commit`,
+ CreateFixupCommit: `Creëer fixup commit`,
SquashAboveCommitsTooltip: `Squash bovenstaande commits`,
CreateFixupCommitTooltip: `Creëer fixup commit`,
- SureCreateFixupCommit: `Weet je zeker dat je een fixup wil maken! commit voor commit {{.commit}}?`,
ExecuteCustomCommand: "Voer aangepaste commando uit",
CustomCommand: "Aangepaste commando:",
CommitChangesWithoutHook: "Commit veranderingen zonder pre-commit hook",
diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go
index 6716673b3..bcbf66da8 100644
--- a/pkg/i18n/english.go
+++ b/pkg/i18n/english.go
@@ -391,8 +391,14 @@ type TranslationSet struct {
ViewResetOptions string
FileResetOptionsTooltip string
CreateFixupCommit string
- CreateFixupCommitDescription 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
SquashCommitsAboveSelectedTooltip string
SquashCommitsInCurrentBranchTooltip string
@@ -400,7 +406,6 @@ type TranslationSet struct {
SquashCommitsInCurrentBranch string
SquashCommitsAboveSelectedCommit string
CannotSquashCommitsInCurrentBranch string
- SureCreateFixupCommit string
ExecuteCustomCommand string
ExecuteCustomCommandTooltip string
CustomCommand string
@@ -969,486 +974,491 @@ for up-to-date information how to configure your editor.
// exporting this so we can use it in tests
func EnglishTranslationSet() TranslationSet {
return TranslationSet{
- NotEnoughSpace: "Not enough space to render panels",
- DiffTitle: "Diff",
- FilesTitle: "Files",
- BranchesTitle: "Branches",
- CommitsTitle: "Commits",
- StashTitle: "Stash",
- SnakeTitle: "Snake",
- EasterEgg: "Easter egg",
- UnstagedChanges: "Unstaged changes",
- StagedChanges: "Staged changes",
- MainTitle: "Main",
- MergeConfirmTitle: "Merge",
- StagingTitle: "Main panel (staging)",
- MergingTitle: "Main panel (merging)",
- NormalTitle: "Main panel (normal)",
- LogTitle: "Log",
- CommitSummary: "Commit summary",
- CredentialsUsername: "Username",
- CredentialsPassword: "Password",
- CredentialsPassphrase: "Enter passphrase for SSH key",
- CredentialsPIN: "Enter PIN for SSH key",
- PassUnameWrong: "Password, passphrase and/or username wrong",
- Commit: "Commit",
- CommitTooltip: "Commit staged changes.",
- AmendLastCommit: "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.",
- NoCommitToAmend: "There's no commit to amend.",
- CommitChangesWithEditor: "Commit changes using git editor",
- 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>",
- NoDeletedLinesInDiff: "No deleted lines in diff",
- NoBaseCommitsFound: "No base commits found",
- MultipleBaseCommitsFoundStaged: "Multiple base commits found. (Try staging fewer changes at once)",
- MultipleBaseCommitsFoundUnstaged: "Multiple base commits found. (Try staging some of the changes)",
- BaseCommitIsAlreadyOnMainBranch: "The base commit for this change is already on the main branch",
- 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?",
- StatusTitle: "Status",
- Menu: "Menu",
- Execute: "Execute",
- Stage: "Stage",
- StageTooltip: "Toggle staged for selected file.",
- ToggleStagedAll: "Stage all",
- ToggleStagedAllTooltip: "Toggle staged/unstaged for all files in working tree.",
- 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.",
- OpenDiffTool: "Open external diff tool (git difftool)",
- OpenMergeTool: "Open external merge tool",
- OpenMergeToolTooltip: "Run `git mergetool`.",
- 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`.",
- 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.",
- 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.",
- Scroll: "Scroll",
- MergeConflictsTitle: "Merge conflicts",
- Checkout: "Checkout",
- CheckoutTooltip: "Checkout selected item.",
- CantCheckoutBranchWhilePulling: "You cannot checkout another branch while pulling the current branch",
- 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.",
- CantPullOrPushSameBranchTwice: "You cannot push or pull a branch while it is already being pushed or pulled",
- FileFilter: "Filter files by status",
- CopyToClipboardMenu: "Copy to clipboard",
- CopyFileName: "File name",
- CopyFilePath: "Path",
- CopyFileDiffTooltip: "If there are staged items, this command considers only them. Otherwise, it considers all the unstaged ones.",
- CopySelectedDiff: "Diff of selected file",
- CopyAllFilesDiff: "Diff of all files",
- NoContentToCopyError: "Nothing to copy",
- FileNameCopiedToast: "File name copied to clipboard",
- FilePathCopiedToast: "File path copied to clipboard",
- FileDiffCopiedToast: "File diff copied to clipboard",
- AllFilesDiffCopiedToast: "All files diff copied to clipboard",
- FilterStagedFiles: "Show only staged files",
- FilterUnstagedFiles: "Show only unstaged files",
- ResetFilter: "Reset filter",
- NoChangedFiles: "No changed files",
- SoftReset: "Soft reset",
- AlreadyCheckedOutBranch: "You have already checked out this branch",
- SureForceCheckout: "Are you sure you want force checkout? You will lose all local changes",
- ForceCheckoutBranch: "Force checkout branch",
- BranchName: "Branch name",
- NewBranchNameBranchOff: "New branch name (branch is off of '{{.branchName}}')",
- CantDeleteCheckOutBranch: "You cannot delete the checked out branch!",
- DeleteBranchTitle: "Delete branch '{{.selectedBranchName}}'?",
- DeleteLocalBranch: "Delete local branch",
- DeleteRemoteBranchOption: "Delete remote branch",
- DeleteRemoteBranchPrompt: "Are you sure you want to delete the remote branch '{{.selectedBranchName}}' from '{{.upstream}}'?",
- ForceDeleteBranchTitle: "Force delete branch",
- ForceDeleteBranchMessage: "'{{.selectedBranchName}}' is not fully merged. Are you sure you want to delete it?",
- RebaseBranch: "Rebase",
- RebaseBranchTooltip: "Rebase the checked-out branch onto the selected branch.",
- CantRebaseOntoSelf: "You cannot rebase a branch onto itself",
- CantMergeBranchIntoItself: "You cannot merge a branch into itself",
- ForceCheckout: "Force checkout",
- 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",
- CheckoutByNameTooltip: "Checkout by name. In the input box you can enter '-' to switch to the last branch.",
- RemoteBranchCheckoutTitle: "Checkout {{.branchName}}",
- CheckoutTypeNewBranch: "New local branch",
- CheckoutTypeNewBranchTooltip: "Checkout the remote branch as a local branch, tracking the remote branch.",
- 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.",
- 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.",
- NoBranchesThisRepo: "No branches for this repo",
- CommitWithoutMessageErr: "You cannot commit without a commit message",
- Close: "Close",
- CloseCancel: "Close/Cancel",
- Confirm: "Confirm",
- 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.",
- NoCommitsThisBranch: "No commits for this branch",
- UpdateRefHere: "Update branch '{{.ref}}' here",
- CannotSquashOrFixupFirstCommit: "There's no commit below to squash into",
- Fixup: "Fixup",
- 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?",
- 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.",
- Pick: "Pick",
- CantPickDisabledReason: "Cannot pick a commit when not mid-rebase",
- Edit: "Edit",
- RevertCommit: "Revert commit",
- Revert: "Revert",
- RevertCommitTooltip: "Create a revert commit for the selected commit, which applies the selected commit's changes in reverse.",
- Reword: "Reword",
- CommitRewordTooltip: "Reword the selected commit's message.",
- 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.",
- MoveDownCommit: "Move commit down one",
- MoveUpCommit: "Move commit up one",
- CannotMoveAnyFurther: "Cannot move any further",
- 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.",
- 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",
- ResetAuthor: "Reset author",
- ResetAuthorTooltip: "Reset the commit's author to the currently configured user. This will also renew the author timestamp",
- SetAuthor: "Set author",
- SetAuthorTooltip: "Set the author based on a prompt",
- AddCoAuthor: "Add co-author",
- AmendCommitAttribute: "Amend commit attribute",
- AmendCommitAttributeTooltip: "Set/Reset commit author or set co-author.",
- SetAuthorPromptTitle: "Set 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.",
- 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",
- Error: "Error",
- PickHunk: "Pick hunk",
- PickAllHunks: "Pick all hunks",
- Undo: "Undo",
- UndoReflog: "Undo",
- 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.",
- 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.",
- DiscardAllTooltip: "Discard both staged and unstaged changes in '{{.path}}'.",
- DiscardUnstagedTooltip: "Discard unstaged changes in '{{.path}}'.",
- Pop: "Pop",
- StashPopTooltip: "Apply the stash entry to your working directory and remove the stash entry.",
- Drop: "Drop",
- StashDropTooltip: "Remove the stash entry from the stash list.",
- Apply: "Apply",
- StashApplyTooltip: "Apply the stash entry to your working directory.",
- NoStashEntries: "No stash entries",
- StashDrop: "Stash drop",
- SureDropStashEntry: "Are you sure you want to drop this stash entry?",
- StashPop: "Stash pop",
- SurePopStashEntry: "Are you sure you want to pop this stash entry?",
- StashApply: "Stash apply",
- SureApplyStashEntry: "Are you sure you want to apply this stash entry?",
- NoTrackedStagedFilesStash: "You have no tracked/staged files to stash",
- NoFilesToStash: "You have no files to stash",
- StashChanges: "Stash changes",
- RenameStash: "Rename stash",
- RenameStashPrompt: "Rename stash: {{.stashName}}",
- OpenConfig: "Open config file",
- EditConfig: "Edit config file",
- ForcePush: "Force push",
- ForcePushPrompt: "Your branch has diverged from the remote branch. Press {{.cancelKey}} to cancel, or