diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 17:58:48 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | e63685705753177d0401a31be96873bd4b1bb177 (patch) | |
tree | 58efc9689bc9b91bce43d1d240b77c5ed0e2d762 /pkg/commands/commits.go | |
parent | 1ae8523098daddb890af03d447d5c12bd08952c8 (diff) |
prevent adding staged files when renaming top commit
Diffstat (limited to 'pkg/commands/commits.go')
-rw-r--r-- | pkg/commands/commits.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/commands/commits.go b/pkg/commands/commits.go index 4742ce448..74043518d 100644 --- a/pkg/commands/commits.go +++ b/pkg/commands/commits.go @@ -11,7 +11,7 @@ import ( // RenameCommit renames the topmost commit with the given name func (c *GitCommand) RenameCommit(name string) error { - return c.RunCommand("git commit --allow-empty --amend -m %s", c.OSCommand.Quote(name)) + return c.RunCommand("git commit --allow-empty --amend --only -m %s", c.OSCommand.Quote(name)) } // ResetToCommit reset to commit |