Skip to content

Commit 7a284d3

Browse files
authored
Ensure git checkout works with untracked files
Closes #14425.
1 parent fdbc664 commit 7a284d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mix/lib/mix/scm/git.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ defmodule Mix.SCM.Git do
141141

142142
# Migrate the Git repo
143143
rev = lock_rev || get_origin_opts_rev(opts) || default_branch()
144-
git!(["--git-dir=.git", "checkout", "--quiet", rev])
144+
git!(["--git-dir=.git", "checkout", "--force", "--quiet", rev])
145145

146146
if opts[:submodules] do
147147
git!(~w[-c core.hooksPath='' --git-dir=.git submodule update --init --recursive])

0 commit comments

Comments
 (0)