简体   繁体   中英

How to list all not versioned files and directories in a Git working copy?

I'm developing on a VM and would like to see, which files and directories I need to add manually to my web directory on the remote server when I will be deploying the project (eg files with environment specific settings / credentials). How can I get a list of these files / directories?

git ls-files -o

The -o option of ls-files will show untracked files.

If you would like untracked directories listed as directories and not all the individual files you can do:

git ls-files -o --directory
git ls-files --others --exclude-standard
  • --others option shows untracked files.

  • --exclude-standard option excludes the files that are included in gitignore or .git/info/exclude .

See git-ls-files .

git status -uall

This command will show all untracked files and directories including untracked files in untracked directories. Use -unormal to hide untracked files in untracked directories.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM