aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/vcs/git.go')
-rw-r--r--pkg/vcs/git.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/vcs/git.go b/pkg/vcs/git.go
index 49a795e12..557a0dfe7 100644
--- a/pkg/vcs/git.go
+++ b/pkg/vcs/git.go
@@ -123,6 +123,7 @@ func (git *git) fetchRemote(repo string) error {
func (git *git) SwitchCommit(commit string) (*Commit, error) {
git.git("reset", "--hard")
+ git.git("clean", "-fdx")
if _, err := git.git("checkout", commit); err != nil {
return nil, err
}
@@ -145,7 +146,7 @@ func (git *git) clone(repo, branch string) error {
func (git *git) reset() {
// This function tries to reset git repo state to a known clean state.
git.git("reset", "--hard")
- git.git("clean", "-fd")
+ git.git("clean", "-fdx")
git.git("bisect", "reset")
git.git("reset", "--hard")
}