Remix.run Logo
masfuerte 4 hours ago

> GitHub, GitLab, and Gitea all respect .gitignore and won’t show ignored files in the web UI

Is this right? These tools don't show ignored files because they aren't part of the repository. If a now-ignored file has made it into the repository, surely you want to see it?

silverwind 4 hours ago | parent | next [-]

Not true, you can push a file and later gitignore it and it will remain visible on those UIs. It's still part of the repo.

Doing it the other way around is also possible but harder as the git client will refuse but can be convinced.

paulddraper 4 hours ago | parent | prev | next [-]

Yeah this is wrong.

They will show the files in your repo.

gitignore just decides whether untracked files appear as new or ignored. (But you can commit them anyway if you are so inclined.)

chrisweekly 3 hours ago | parent [-]

how do you commit a file without first adding it?

JonathonW 3 hours ago | parent [-]

`git add -f` will add ignored files. Once you've done that, any files you've added will be part of your commit regardless of the contents of .gitignore.

chrisweekly 3 hours ago | parent [-]

Right... and also (I think; unsure bc I only ever use cli) some GUIs (eg github.com web ui) may enable adding files that'd otherwise be ignored.

(shrug)

wheybags 2 hours ago | parent | prev [-]

Yeah, also that's probably not the kind of error a human writing this post would make... I stopped reading at that point

plorkyeran 42 minutes ago | parent [-]

This is exactly the sort of error that a human with a slightly incorrect mental model for something makes all the time.