git checkout only certain file types for entire project

后端 未结 6 1215
遥遥无期
遥遥无期 2020-12-31 05:36

Is there a way to perform a git checkout for only certain file types (.xlf), which recurses down through the entire repository? The results should contain the struture of th

6条回答
  •  梦毁少年i
    2020-12-31 05:39

    On PowerShell (Windows, haven't tried PowerShell Core+Linux), I was able to do it like this

    git ls-tree master -r --name-only | sls ".cscfg" | foreach { git checkout origin/master -- $_ }

提交回复
热议问题