Skip to content

Instantly share code, notes, and snippets.

@joemaffia
Last active November 15, 2024 11:40
Show Gist options
  • Save joemaffia/bacf72580d425c8eee67ec68708a4124 to your computer and use it in GitHub Desktop.
Save joemaffia/bacf72580d425c8eee67ec68708a4124 to your computer and use it in GitHub Desktop.
Clear git cache
git rm -r --cached .
git add .
git commit -m 'git cache cleared'
git push
@LucasBarbosa88
Copy link

is just -m

@renishpaystudio
Copy link

Here is the clear GIT cache for a specific file.

git rm --cached database.php
git add --all
git commit -m "Remove the database config file cache"
git push origin branch_name

You can read more about git clear cache for the specific files you can check it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment