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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:54:03+00:00 2026-06-08T23:54:03+00:00

I have a database project that generates these files and added to gitignore. However

  • 0

I have a database project that generates these files and added to gitignore. However they don’t seem to be getting ignored and I need to revert them before commiting, quite annoying. The files are still locked by VS, is this a problem?

#
# Windows and Mac OS X Temp Cache Files
#
[Tt]humbs.db
*.DS_Store

#
#Visual Studio files
#
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.sdf
*.dbmdl
*.mdf
*.ldf
*.Database.dbmdl
ipch/
obj/
[Bb]in
[Dd]ebug*/
[Rr]elease*/

#
#Tooling
#
_ReSharper*/
*.resharper
[Tt]est[Rr]esult*

#
#Project files
#
[Bb]uild/

#
#Subversion files
#
.svn

#
# Microsoft Office Temp Files
#
~$*

#
# YoureOnTime specific files
#
YoureOnTime.Database.dbmdl


# End of File
  • 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-06-08T23:54:04+00:00Added an answer on June 8, 2026 at 11:54 pm

    I need to revert them before commiting

    indicates that they are already versioned and were entered into .gitignore after they were added using git add.

    Two possible solutions:

    1. temporarily take them out of your .gitignore, then
      git rm --cached -- *.mdf and
      git rm --cached -- *.ldf.
      This will remove the files from the index while keeping them on disk. When done,
      git commit -m "removing crap from repo" and restore your .gitignore.

    2. If you don’t want to play around with your .gitignore, you could use update-index:
      git update-index --assume-unchanged -- *.mdf and
      git update-index --assume-unchanged -- *.ldf.
      This will force git to see the files as unchanged even if they were.

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

Sidebar

Related Questions

I have gwt-project that is comunication to database. Application design mvp pattern and view
I have a SSIS project that queries a database and get item level data.
I have a JRuby project that connects to an Oracle database using JDBC via
I have a web application project that works with a quite large database (over
I have some code in my project that saves an object to the database,
I have a Play Framework (1.2.4) project with PlayMorphia that has two different database
I am designing a database for a project. I have a table that has
I have a project which generates snapshots of a database, converts it to XML
I have an SQL 2008 database project in Visual Studio 2010 that is sync'ed
I have a few .Net projects that would benefit from using a document/object database

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.