wsha
wsha

Reputation: 964

How to 'git status' to show contents/files of an untracked directory?

I have few new directories in my local repo which contain some auto generated files and some scripts.
I want to commit and push my scripts to remote repo but skip auto generated files. How do i add these script files from within untracked git directory?

git status -- Doesn't show the contents of untracked files.
Example

Upvotes: 4

Views: 3625

Answers (1)

wsha
wsha

Reputation: 964

From the git docs, there is an option -u

git status -u

will show list of all untracked files and I can add them as I want. plus, I found out that, this can be set into global config file and I can skip -u option with git status

git config --global status.showUntrackedFiles all

Upvotes: 16

Related Questions