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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:01:32+00:00 2026-05-22T19:01:32+00:00

I have a config file stuff.conf in an open source project I’m working on.

  • 0

I have a config file stuff.conf in an open source project I’m working on. I want an example copy of this file to live in the Git repository (in its rightful path) so that people who clone the project will get it. However, it’s convenient to make local changes to the config while working on the software—at which point I inevitably inadvertently commit those changes with git -a. At best, the changed file lies around whining at git status.

A similar problem arises in Makefiles with config variables in them.

Is there any way, short of removing the file from Git control, to tell Git to simply ignore changes to a particular path until further notice?

  • 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-22T19:01:33+00:00Added an answer on May 22, 2026 at 7:01 pm

    git update-index --assume-unchanged should do the trick.

    From http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html:

    When the “assume unchanged” bit is on,
    git stops checking the working tree
    files for possible modifications, so
    you need to manually unset the bit to
    tell git when you change the working
    tree file. This is sometimes helpful
    when working with a big project on a
    filesystem that has very slow lstat(2)
    system call (e.g. cifs).

    This option can be also used as a
    coarse file-level mechanism to ignore
    uncommitted changes in tracked files
    (akin to what .gitignore does for
    untracked files). Git will fail
    (gracefully) in case it needs to
    modify this file in the index e.g.
    when merging in a commit; thus, in
    case the assumed-untracked file is
    changed upstream, you will need to
    handle the situation manually.

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

Sidebar

Related Questions

I have a .net interop project that uses an app.config file. When I am
I have a wxPython application that relies on an external config file. I want
How can I have a relative path in the web.config file. This value is
I have this in my web.config file (edited to reflect some changes): <configSections> <section
I have referenced a config file that is located in a solution folder. I
I have an app.config file inside my TestProject, but when I try to read
As many do I have a config.php file in the root of a web
In my ASP.NET application I have a web.config file. In the web.config file I
I have the following web config file. I am having some difficulty in retrieving
I have the following code in a web.config file of the default IIS site.

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.