Gitignore wp-migrate-db-pro

User
# Application
website/wordpress/web/app/cache/*
website/wordpress/web/adminer.php
website/wordpress/web/app/plugins/*
!website/wordpress/web/app/plugins/.gitkeep
# website/wordpress/web/app/mu-plugins/*/
website/wordpress/web/app/upgrade
website/wordpress/web/app/uploads/*
!website/wordpress/web/app/uploads/.gitkeep
website/wordpress/web/app/languages/*.json
website/wordpress/web/app/languages/mo-cache/
!website/wordpress/web/app/languages/plugins/
website/wordpress/web/app/languages/plugins/*.json
!website/wordpress/web/app/languages/themes/
website/wordpress/web/app/languages/themes/*.json
website/wordpress/web/app/wp-rocket-config/
data/

# WordPress
website/wordpress/web/wp
website/wordpress/web/.htaccess
!website/wordpress/web/app/themes/*
website/wordpress/web/app/themes/twentytwentytwo
!website/wordpress/web/app/plugins/acfml
!website/wordpress/web/app/plugins/advanced-custom-fields-pro
!website/wordpress/web/app/plugins/elementor-pro
!website/wordpress/web/app/plugins/sitepress-multilingual-cms
!website/wordpress/web/app/plugins/wp-rocket
!website/wordpress/web/app/plugins/wppusher
!website/wordpress/web/app/plugins/wp-migrate-db-pro
!website/wordpress/web/app/plugins/wp-seo-multilingual
!website/wordpress/web/app/plugins/wpml-media-translation
!website/wordpress/web/app/plugins/wpml-string-translation

# Logs
*.log

# Dotenv
.env
.env.*
!.env.example

# Composer
/vendor

# WP-CLI
wp-cli.local.yml

# Generated by MacOS
.DS_Store
its still taking wp-migrate-db plugin when creating new branch push to bitbucket

Assistant
To ensure that the `wp-migrate-db-pro` plugin is not included in your Bitbucket repository when you create a new branch or push, here are a few troubleshooting steps:

### 1. **Verify the `.gitignore` file**
Ensure your `.gitignore` file is correctly set up. The following line should exclude all plugins, except for the ones explicitly whitelisted:

website/wordpress/web/app/plugins/*

However, the exception line for `wp-migrate-db-pro` should include a `!` to whitelist it if needed, or it should not be listed at all to exclude it:

!website/wordpress/web/app/plugins/wp-migrate-db-pro

If the intention is to exclude `wp-migrate-db-pro`, remove or comment out the line.

### 2. **Check Git Cache**
If the file or folder is already tracked by Git, updates to `.gitignore` won't take effect unless you clear the cache. Run the following commands:

git rm -r --cached website/wordpress/web/app/plugins/wp-migrate-db-pro

Then commit the changes:

git commit -m "Remove wp-migrate-db-pro from Git tracking"

Push the changes to Bitbucket:

git push origin branch-name

### 3. **Test Ignored Files**
To confirm `.gitignore` is working as intended, use the following command:

git check-ignore -v website/wordpress/web/app/plugins/wp-migrate-db-pro

This will show if the plugin folder is ignored and which `.gitignore` rule is causing it.

### 4. **Confirm No Leftover Files**
Ensure there are no leftover files in other branches or commits that might reappear. You can clean up untracked files locally with:

git clean -fd

### 5. **Validate Repository Content**
After making the changes, verify the branch on Bitbucket. Check if the `wp-migrate-db-pro` folder is still present in the repository. If it is, it could be due to:

– A misconfigured `.gitignore`.
– Manual additions to the repository overriding `.gitignore`.

Let me know if you need further clarification!

Leave a Comment

Your email address will not be published. Required fields are marked *