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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:14:24+00:00 2026-06-15T05:14:24+00:00

Why would config/database.yml be included in the .gitignore file by default? This small item

  • 0

Why would config/database.yml be included in the .gitignore file by default? This small item cost me an hour or two.

The way I stumbled into this trouble:

  • I thought I was confused about how git handled reset and revert.
  • I had been experimenting with code changes that affected config/database.yml
  • I didn’t like the result, so I abandoned the changes.
  • It was odd, because it seemed I could not checkout an unedited version of config/database.yml
  • I then spent way too much time trying to figure out if I was misunderstanding git’s reset and merge commands.
  • Turns out config/database.yml was included in the .gitignore file by default.

Not sure why. Cost me an hour or so of fiddling with reset and merge options, when it turns out I wasn’t even tracking the file. As I write this, I realize I am not entirely sure when .gitignore was written/modified to include config/database.yml

Is there some reason it should be there?

  • 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-15T05:14:25+00:00Added an answer on June 15, 2026 at 5:14 am

    That file usually won’t contain much interesting content for tracking in a version control system.

    But, it will often contain passwords for connecting to a database server, which should not be made public.

    It will also often contain information which needs to differ between different working copies, different user or database names for a database server, different paths to a SQLite file. These differences would make it impossible to track this file in the version control system.

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

Sidebar

Related Questions

I would like to access the $db['default']['dbprefix'] variable from /application/config/database.php ( CodeIgniter configuration file)
I would like to retrieve the AppSetting key from the assembly config file called:
I need my program to create and edit a config file, which would contain
In my Rails app, what would be the way to access a Devise config
I have a number of settings that are currently in the config.yml file. Going
I would like to have individuals config for my rails apps on my server,
My problem is: I have 3 procs that would like to share config loaded
On my asp webforms app I would do the log4net initialization; log4net.Config.XmlConfigurator.Configure(); on global.asax
I'm building a plugin assembly and I would like to provide an accompanying config
Would like to parse IPv4 address from exit-addresses . Format of the file: ExitNode

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.