Is there a way to list only the untracked files in git? git status works, but i need to do some parsing in order to get a list of untracked files. Something like git status --show-only-untracked?
thanks
Jerry
threads / discuss / 13791
Subject: list all the untrack files in a git respo
Is there a way to list only the untracked files in git? git status works, but i need to do some parsing in order to get a list of untracked files. Something like git status --show-only-untracked?
thanks
Jerry
Re: list all the untrack files in a git respo
"Gerb Stralko" <gerb.stralko@gmail.com> writes:
> Is there a way to list only the untracked files in git? git status > works, but i need to do some parsing in order to get a list of > untracked files. Something like git status --show-only-untracked?
git-status is porcelain, meant for human consumption. For list of untracked files use
$ git ls-files --other --exclude-standard
-- Jakub Narebski Poland ShadeHawk on #git
Re: list all the untrack files in a git respo
On Wednesday 04 June 2008, Gerb Stralko wrote:
> Is there a way to list only the untracked files in git? git status > works, but i need to do some parsing in order to get a list of > untracked files. Something like git status --show-only-untracked?
Is git ls-files -o what you want?
(Depending on your use case, you might also find the --exclude-standard and --directory options useful as well. See the git-ls-files manual page for details)
...Johan
-- Johan Herland, <johan@herland.net> www.herland.net
Re: list all the untrack files in a git respo
> git ls-files -o > > ...Johan
This is exactly what i want. Thanks Johan.
Jerry
Re: list all the untrack files in a git respo
Gerb Stralko venit, vidit, dixit 04.06.2008 16:05:
> Is there a way to list only the untracked files in git? git status > works, but i need to do some parsing in order to get a list of > untracked files. Something like git status --show-only-untracked? > > thanks > > Jerry
git-ls-files --others --exclude-standard
may be what you are looking for.
Michael