Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

file

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 (e.g. files with environment specific settings / credentials). How can I get a list of these files / directories?

like image 429
automatix Avatar asked Dec 01 '22 21:12

automatix


1 Answers

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
like image 68
Mark Stewart Avatar answered May 17 '23 10:05

Mark Stewart