mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-11 12:48:10 +03:00
clean as well as reset (I'm hoping this is a good design decision)
This commit is contained in:
@ -208,9 +208,13 @@ func includesInt(list []int, a int) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// ResetHard clears the working tree to match HEAD
|
||||
func (c *GitCommand) ResetHard() error {
|
||||
return c.OSCommand.RunCommand("git reset --hard HEAD")
|
||||
// ResetAndClean removes all unstaged changes and removes all untracked files
|
||||
func (c *GitCommand) ResetAndClean() error {
|
||||
if err := c.OSCommand.RunCommand("git reset --hard HEAD"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.OSCommand.RunCommand("git clean -fd")
|
||||
}
|
||||
|
||||
// UpstreamDifferenceCount checks how many pushables/pullables there are for the
|
||||
|
Reference in New Issue
Block a user