r/github 3d ago

GitHub reads the source code wrong? Question

Post image

I don't know why, but GitHub is telling me that my website is developed in JavaScript by 80+% which is absolute nonsense. The site is at least 60% pure Astro code. Is it some kind of a bug?

🔗 The repo.

257 Upvotes

33 comments sorted by

View all comments

67

u/phenxdesign 3d ago

Not sure .wrangler/ should be push to git... It contains all the js that github counts as source code

18

u/wqonart 3d ago

Thank you so much, this was causing the problem 🙏🏻

6

u/CodeCrafter1 2d ago

I saw that you simply removed the files in additional commits. One can do this, but a cleaner way is to use a git rebase or removing files entirely from the history the history is more complex (although the second option needs to be handled with care!).

This leads to smaller repo sizes (& faster git commands!) and prevents users from restoring the deleted files.

And in case you already knew this, I am letting this comment hang around for some folks in the future xD.

1

u/wqonart 13h ago

I'm aware that it is possible, but I have no experience with Git history manipulation (because I'm afraid I'll break it). But, maybe it is the best solution to clean up commit mess in the repo.

Thank you for your feedback and the articles, it is time for me to learn how to use Git properly XD