tree
에서 무시되는 파일을 표시하지 않는 방법이 .gitignore
있습니까?
이 방법이 도움이 될 수 있습니다. 필터 git
와 거의 호환되는 방식으로 무시 된 파일을 나열 합니다 tree
.
function tree-git-ignore {
# tree respecting gitignore
local ignored=$(git ls-files -ci --others --directory --exclude-standard)
local ignored_filter=$(echo "$ignored" \
| egrep -v "^#.*$|^[[:space:]]*$" \
| sed 's~^/~~' \
| sed 's~/$~~' \
| tr "\\n" "|")
tree --prune -I ".git|${ignored_filter: : -1}" "$@"
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다