diff --git a/cli/dotfiles.go b/cli/dotfiles.go index 635a3add33c0a..88d57c7089eaf 100644 --- a/cli/dotfiles.go +++ b/cli/dotfiles.go @@ -176,8 +176,8 @@ func (r *RootCmd) dotfiles() *clibase.Cmd { var dotfiles []string for _, f := range files { - // make sure we do not copy `.git*` files - if strings.HasPrefix(f.Name(), ".") && !strings.HasPrefix(f.Name(), ".git") { + // make sure we do not copy `.git*` files except `.gitconfig` + if strings.HasPrefix(f.Name(), ".") && (!strings.HasPrefix(f.Name(), ".git") || f.Name() == ".gitconfig") { dotfiles = append(dotfiles, f.Name()) } }