У меня есть git-репо, как показано ниже:
[root@localhost www]# tree
.
├── admin.php
├── api
├── index.htm
└── remote
└── mod
├── index.htm
├── mod_cron.php
└── mod_index.php
3 directories, 5 files
Легко получить список папок и файлов, отслеживаемых git.
[root@localhost www]# git ls-files >a.txt
[root@localhost www]# cat a.txt
.gitattributes
.gitignore
admin.php
api/index.htm
api/remote/mod/index.htm
api/remote/mod/mod_cron.php
api/remote/mod/mod_index.php
Но в рабочей директории есть некоторые папки и файлы, которые не отслеживаются git. Вся рабочая директория, как показано ниже:
[root@localhost www]# tree
.
├── admin.php
├── api
│ ├── index.htm
│ └── remote
│ ├── index.htm
│ ├── index.php
│ └── mod
│ ├── index.htm
│ ├── mod_cron.php
│ └── mod_index.php
├── archiver
└── index.php
4 directories, 8 files
Как получить список папок и файлов, не отслеживаемых git, как показано ниже :
archiver/
archiver/index.php
api/remote/index.htm
api/remote/index.php
Я хочу использовать этот список в rsync -av --files-from=/path/to/not_tracked_files_lsit
.
Заранее спасибо!