One day I setup gitignore for existing project/repository, the expected result is all file/folder defined on gitignore is ignored by git when doing commit or push, but when I commit/push the code, file and folder defined on gitignore is still pushed to repository. After some google I found that git is likely caching this, and we need to delete this cache to make it work. We can delete this cache with this command :
git rm -r --cached . git add . git commit -m "fixed untracked files"
After command above git will exclude ignored file with in gitignore.
ref : https://stackoverflow.com/questions/11451535/gitignore-is-ignored-by-git
Apache (5)
CSS (3)
Docker (6)
Git (5)
Go (1)
Hobbies & Toys (8)
HTML (4)
Javascript (5)
jQuery (3)
Linux Ubuntu (46)
Misc (36)
MySQL (3)
Odoo (13)
PHP (3)
Pipeline (1)
Postgresql (6)
Python (13)
Quote (1)
Qweb (1)
Random Word (1)
Smartphone (1)
SQL Server (1)
Tools (7)
Useful Links (46)
Video (3)
VLC (1)
Vue (1)
Web Server (3)
zuka.one
©2011