Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4531712
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T13:56:17+00:00 2026-05-21T13:56:17+00:00

git ls-files –others goes down the directory tree. Is there an easy way to

  • 0
git ls-files --others

goes down the directory tree. Is there an easy way to show untracked files only in the current directory?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T13:56:18+00:00Added an answer on May 21, 2026 at 1:56 pm

    Use the exclude pattern of ls-files:

     # on Windows, with msysgit
     git ls-files --others -x */*
    
     # on Unix (Cygwin or Ubuntu), quotes are necessary around the pattern
     git ls-files --others -x "*/*"
    

    From the man page:

    -x <pattern>
    --exclude=<pattern>
    

    Skip untracked files matching pattern. Note that pattern is a shell wildcard pattern.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to use a command like git ls-files to show only
I have a git directory which contains the a whole bunch of files and
Git says to use git add to add untracked files to my repo. I
When doing: >git status It shows a big list of .pyc files under untracked
The end of git status looks like this: # Untracked files: # (use git
I have a list of changed files in git repository. There is one file
Everytime I do git status there is this folder that appears as untracked. $
Does git create any files/folders (hidden?) in the project tree at all? If so,
Possible Duplicate: Git - Whitelisting files in a complex directory structure I have a
How can I delete a single directory containing files from a Git repository?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.