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

  • SEARCH
  • Home
  • 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 3959032
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:40:48+00:00 2026-05-20T02:40:48+00:00

I have looked, searched, and read documentation and can’t really find anything about this.

  • 0

I have looked, searched, and read documentation and can’t really find anything about this.

Basically, I want to be able to do this:

git reset -- *.exe

or

git reset -- */some_executable.exe

Instead of this:

git reset -- some/very/long/path/some_executable.exe

Also it’d be nice to be able to do this:

git reset -- topleveldirectory/another/subdirectory/*

Instead of this:

git reset -- topleveldirectory/another/subdirectory/SomeFile.cpp
git reset -- topleveldirectory/another/subdirectory/SomFile.h

I think I can use the wildcard * in git-add to add files, but haven’t found anything that works in the case above.

Any suggestions or pointers to where I can look for more info?

Using: git version 1.7.3.1.msysgit.0 on 64-bit Windows 7

  • 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-20T02:40:48+00:00Added an answer on May 20, 2026 at 2:40 am

    Git does support some pathspec globbing, but you need to be careful to shell-escape the characters so they aren’t interpreted by in your case, msys bash, which doesn’t support more sophisticated wildcard expansion.

    EDIT: Also, for your reset example, you can just pass the directory as an argument to git reset and git will operate recursively.

    git reset my/long/path
    

    rather than

    git reset my/long/path/*
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK I have looked and searched all i want to do is fire a
I have googled this, searched this, looked through SO and other sites (I've been
I have searched for a while, followed this answer even looked at the shell
I've searched high and low for the answer to this and can find nothing
I have searched everywhere but can't find a solution that works for me. I
I have looked on this site, googled, and even searched adobe developer central, without
Have looked quite hard for this answer but having no luck. I have 3
I have looked at questions like this , this , this and this ,
I have looked on the web to find a list of all Python keywords
I have looked around on Google and StackOverflow for the answer to this question,

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.