I am deploying my project on Linux based VM via Copy Files Over SSH step in VSTS build definition. Below is the folder structure.
root
-- .git
-- .gitignore
-- folder1
-- folder2
.
.
.
I want to ignore .git folder when copying file to Linux based staging server (VM on Azure). I tried below minimatch patterns but none of them working.
**/!(.git)
**/!.git
Let me know what i am missing and how can i ignore the .git folder. I tried looking on internet but nothing found.
解决方法是(忽略.git文件夹中的所有文件):
!**/.git/**
根据https://www.visualstudio.com/zh-CN/docs/build/steps/deploy/copy-files-over-ssh上的信息,以下方法应该起作用:
!**/.git
The pattern box is multi line and should have an entry per line:
**
!**\\folderodontwant*
This way you can have multiple exclusion and inclusions with less complexity.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.