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 7535499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:19:01+00:00 2026-05-30T06:19:01+00:00

tl;dr : Is there a way to get Git to permanently exclude all working-copy

  • 0

tl;dr:
Is there a way to get Git to permanently exclude all working-copy changes in a subdirectory of a Git repository, from being listed in “untracked files” and “deleted files” in git status and friends, without removing them from the remote origin?

I’m on a system that unavoidably renames certain files, but they shouldn’t be renamed on the repository. I’m not working with those files, but they’re cluttering up my git status and git diff output. Adding them to .gitignore solves the untracked files problem, but it still says the files were deleted.

Long-winded explanation for the curious, and to avoid people saying I shouldn’t be asking this question:

My working copy is in a shared folder that I’m trying to access from both a VM (Ubuntu in VMware Fusion) and the host (Mac OS X); I did the clone on the VM side. The VM’s shared folders feature replaces : with &% in any filename as soon as it’s written to the filesystem, and that’s how OS X sees it. The problem is, my workplace’s Git repository has hundreds of mission-critical files with : in the filename, all in one big directory. I have no need to edit or use these files or the directory they’re all in, but they show up as deletions and untracked files any time I want to use GitX or the command line utilities from the Mac side (which would allow me to do development without using up all my RAM for the VM,). Other than that, git on the Mac sees my other changes correctly, and it would work perfectly except for this one directory. I can’t rename the files back to colons, since that’s illegal on OS X (and breaks ls if you try to mv it, FWIW). Any other solution beside the one I mentioned is welcome! Thanks!

  • 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-30T06:19:04+00:00Added an answer on May 30, 2026 at 6:19 am

    It is possible to mark paths in a git workspace as “unchanged”, so that git status and git diff will not see that the file/path has been modified. E.g.:

    $ echo "default_value=Foo" > local.properties
    $ git add local.properties
    $ git commit -m'Default local.properties'
    
    $ git update-index --assume-unchanged local.properties
    $ echo "default_value=Bar" > local.properties
    $ git status
    # On branch master
    nothing to commit (working directory clean)
    

    Once the “assume-unchanged” bit is set for the path, git will no longer expect any modifications to the file, and will not report any modifications.

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

Sidebar

Related Questions

Is there an easy way or command to get all git commits up to
is there way how to get name ov event from Lambda expression like with
Is there a way to get stored procedures from a SQL Server 2005 Express
I'm trying to get started using Git and TortoiseGit. Is there a way to
I'd really like to get our host to pull from our Git repository instead
is there a way to automatically get git/github to update the doc tags in
Is there a way to have git status ignore certain changes within a file?
Possible Duplicate: Is there a way to get to the git root directory in
Is there a cleaner way to get the short version hash of HEAD from
Is there a way to get the Maven release plugin to sign the Git

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.