prevent adding staged files when renaming top commit

This commit is contained in:
Jesse Duffield
2021-04-06 19:34:32 +10:00
parent 1ae8523098
commit e636857057
+1 -1
View File
@@ -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