Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dvc/scm/git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,10 @@ def install(self):
[
# checking out some reference and not specific file.
'[ "$3" = "1" ]',
# check that we are on some branch/tag and not in detached HEAD
# state, so we don't accidentally break a rebase.
'[ "$(git rev-parse --abbrev-ref HEAD)" != "HEAD" ]',
# make sure we are not in the middle of a rebase/merge, so we
# don't accidentally break it with an unsuccessful dvc checkout.
# Note that git hooks are always running in repo root.
"[ ! -d .git/rebase-merge ]",
],
"checkout",
)
Expand Down