threads / discuss / 26874

Listing top tracked files and directories only

Subject: Listing top tracked files and directories only

## tl;dr

3 messages between Mar 26, 2011 and Mar 26, 2011.

replies: 2people: 2as markdown or json

Francis Moreau· Mar 26, 2011, 16:18 UTC · lore
Hello,

I'd like to find a way to list files and directories tracked by git but which are only in the top directory of the tracked project.

For example, in a kernel repository:
  $ git-magic-command --magic-options
  .gitignore
  .mailmap
   COPYING
   CREDITS
   Kbuild
   MAINTAINERS
   Makefile
   README
   REPORTING-BUGS
   Documentation/
   arch/
   drivers/
   kernel/
   ...
I tried to come up with something using git-ls-files but fails.
Thanks for any suggestions.
-- 
Francis
Scott Chacon· Mar 26, 2011, 16:24 UTC · re: Francis Moreau · lore

Re: Listing top tracked files and directories only

Hey,
On Sat, Mar 26, 2011 at 9:18 AM, Francis Moreau <francis.moro@gmail.com> wrote:
Show 11 quoted lines
> Hello,
>
> I'd like to find a way to list files and directories tracked by git
> but which are only in the top directory of the tracked project.
>
> For example, in a kernel repository:
>
>  $ git-magic-command --magic-options
>  .gitignore
>  .mailmap
>   COPYING
$ git ls-tree --name-only [branch]
Scott
Francis Moreau· Mar 26, 2011, 16:28 UTC · re: Scott Chacon · lore

Re: Listing top tracked files and directories only

On Sat, Mar 26, 2011 at 5:24 PM, Scott Chacon <schacon@gmail.com> wrote:
Show 16 quoted lines
> Hey,
>
> On Sat, Mar 26, 2011 at 9:18 AM, Francis Moreau <francis.moro@gmail.com> wrote:
>> Hello,
>>
>> I'd like to find a way to list files and directories tracked by git
>> but which are only in the top directory of the tracked project.
>>
>> For example, in a kernel repository:
>>
>>  $ git-magic-command --magic-options
>>  .gitignore
>>  .mailmap
>>   COPYING
>
> $ git ls-tree --name-only [branch]
cool thanks a lot !
-- 
Francis

← back to recent threads