Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I do a 'git status' so it doesn't display untracked files without using .gitignore?

How do I do a git status so it doesn't display untracked files without using .gitignore? I want to get modification status information on tracked files only.

like image 817
Ross Rogers Avatar asked Feb 27 '09 13:02

Ross Rogers


People also ask

How do I ignore a git file without Gitignore?

To ignore untracked files, you have a file in your git folder called . git/info/exclude . This file is your own gitignore inside your local git folder, which means is not going to be committed or shared with anyone else. You can basically edit this file and stop tracking any (untracked) file.

Does git status show untracked files?

If git status mentions "Untracked files:", you may need to add one or more untracked files. This status message is OK. We are up-to-date, there is nothing to commit, but there is still an untracked file.

What is untracked files in git status?

Untracked files are files that have been created within your repo's working directory but have not yet been added to the repository's tracking index using the git add command.


1 Answers

Use this:

git status -uno 

which is equivalent to:

git status --untracked-files=no 

It's a bit hidden in the manuals, but the manpage for status says "supports the same options as git-commit", so that's where you'd have to look.

like image 164
Daniel Bruce Avatar answered Sep 27 '22 19:09

Daniel Bruce