mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
clean as well as reset (I'm hoping this is a good design decision)
This commit is contained in:
parent
66512ca253
commit
3b51d7cd00
6 changed files with 16 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue