diff options
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r-- | pkg/commands/git.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 09fe610c2..235809753 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -340,6 +340,16 @@ func (c *GitCommand) StageFile(fileName string) error { return c.OSCommand.RunCommand("git add " + c.OSCommand.Quote(fileName)) } +// StageAll stages all files +func (c *GitCommand) StageAll() error { + return c.OSCommand.RunCommand("git add -A") +} + +// UnstageAll stages all files +func (c *GitCommand) UnstageAll() error { + return c.OSCommand.RunCommand("git reset") +} + // UnStageFile unstages a file func (c *GitCommand) UnStageFile(fileName string, tracked bool) error { var command string |