Tuesday, April 4, 2023

gitignore is not ignoring already committed files or folders

When gitignore is not working for already committed files or folders.

In that time you need to run the below comment first:

git rm --cached file_name

Or

git rm --cached folder_name

Or 

git rm --cached -r folder_name

It will clear committed stuff from git.

Then you can commit and push your branch.

Workflow of WordPress project in a team with Git

1. We should not push any Wordpress core folders or files to github. 2. Only push custom theme and custom plugin into github. 3. So, in this...