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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:39:23+00:00 2026-06-11T07:39:23+00:00

I version control mysql database dumps from websites with git. With –skip-extended-insert, so each

  • 0

I version control mysql database dumps from websites with git.

With –skip-extended-insert, so each record is on it’s own line, it works quite well to track changes. It also allows me to pull old versions of the database from history and import them.

Is there a way to tell git to ignore certain lines or lines containing certain patterns?

  • 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-11T07:39:25+00:00Added an answer on June 11, 2026 at 7:39 am

    No

    Git is file based, it will not modify the contents of tracked files to derive diffs.

    Possible alternatives

    Remove cruft

    Don’t include tables/data in the db dumps that you don’t care for. If it’s not there creating differences, you don’t need to take extra steps to ignore/correct for it.

    So if for example, the problem is deleted articles that you don’t want to backup, remove them from the backup process:

    mysqldump -c -w "articles.deleted IS NULL" articles > backup.sql 
    

    Post process

    Post process the database dump to remove things you don’t care for. As an example, here’s an extract from a db dump helper script I use:

    #!/bin/bash
    mysqldump -dRC --skip-dump-date --skip-add-drop-table --default-character-set=utf8 database $@ > schema.sql
    sed -i 's/ AUTO_INCREMENT=[0-9]\+//' schema.sql
    

    This example (for illustration only) removes autoincrement values from create table statements so that they don’t generate differences in the (version controlled) schema.sql file.

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

Sidebar

Related Questions

Wondering if it is possible to have a version control of a MySQL database.
I am trying to insert rows into a MySQL database from an Access database
I am wanting to do some basic version control with my mysql database structure.
I've been looking at the options for getting our database schemas under version control.
Is it possible to version control a PHP + MySQL + Apache project? And
How do I version control my map/reduce functions for CouchDB? I'd like to be
I'm using version control Versions SVN for Mac. After updating, Xcode begun to show
I'm building a version control module for my network and this is what I
Using a version control system for your source code (like subversion ) makes sense
How do people deploy/version control cronjobs to production? I'm more curious about conventions/standards people

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.