Long story short, I accidentally added a file to .gitignore, which I committed and pushed.
Now I removed the file from .gitignore, but it's still not visible.
What else do I need to do?
under the git repository. You can use patterns with ! as the prefix to “unignore” files. From gitignore man page: An optional prefix “!” which negates the pattern; any matching file excluded by a previous pattern will become included again.
If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a . gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.
gitignore only ignores files that are not part of the repository yet. If you already git add ed some files, their changes will still be tracked. To remove those files from your repository (but not from your file system) use git rm --cached on them.
I'm stupid, it was left in global gitignore, which is why it wasn't showing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With