หนึ่งในสายการบิน
git ls-files -v | grep "^[a-z]"
ใช้นามแฝง
IMHO git hidden
ดีกว่าสำหรับไฟล์ที่ทำเครื่องหมายว่า--assume-unchanged
:
git config --global alias.hidden '!git ls-files -v | grep "^[a-z]"'
นี่คือรายการของนามแฝงที่เกี่ยวข้องที่ฉันมีใน~/.gitconfig
:
[alias]
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
unhide-all = update-index --really-refresh
hidden = !git ls-files -v | grep \"^[a-z]\"
ignored = !git status -s --ignored | grep \"^!!\"
ในการทำให้มันทำงานในไดเรกทอรีย่อยและสนับสนุนอาร์กิวเมนต์ :
hidden = "!f(){ git -C \"$GIT_PREFIX\" ls-files -v \"$@\" | grep \"^[a-z]\";}; f"
ignored = "!f(){ git -C \"$GIT_PREFIX\" status -s --ignored \"$@\" | grep \"^!!\";}; f"
ตัวอย่างเช่น:
# cd target
# git ignored classes
เกี่ยวกับสถานะไฟล์
สำหรับฉันไฟล์ที่ซ่อนอยู่ส่วนใหญ่จะถูกทำเครื่องหมายด้วยแฟh
ล็กแม้ว่าจริงๆแล้วจะมีแฟล็กอื่น ๆ อีกหลายรายการตามคู่มือgit-ls-files
-v
:
-v
Similar to -t, but use lowercase letters for files that are
marked as assume unchanged (see git-update-index(1)).
เกี่ยวกับgit ls-files
-t
:
This option (-t) identifies the file status with the following tags
(followed by a space) at the start of each line:
H cached
S skip-worktree
M unmerged
R removed/deleted
C modified/changed
K to be killed
? other