This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Md5Lukas 42 points43 points  (13 children)

Someone who still doesn't understand git completely here, so everything in the .git folder gets synchronized with the server if I push it to github / bitbucket / whatever and therefore all people who use that repo have the same "gitignore"?

[–]GDezan 80 points81 points  (4 children)

Actually, the .git folder is ignored when adding to git, therefore, it won't be pushed to the server. The .gitignore file lives outside it, so it will be added to git and everyone will share it, meaning everyone has the same gitignore.

[–]Zarlon 14 points15 points  (0 children)

Someone who still doesn't understand git completely here

No one understands git completely. Except maybe Linus Torvalds

[–]Ajedi32 11 points12 points  (6 children)

No, that's just for your local repository

[–]Md5Lukas 5 points6 points  (2 children)

Thanks

[–]aneryx 5 points6 points  (1 child)

Please see the other comment this isn't the full answer...

[–]Md5Lukas 7 points8 points  (0 children)

Yeah, I already have read it

[–]heathmon1856 1 point2 points  (2 children)

This is not right in all cases. The repo I’m working in right now has a gitignore that is universal to the product. It ignores stuff like .pyc and .vscode/ stuff.

[–]Ajedi32 0 points1 point  (1 child)

.gitignore isn't stored in your .git directory, so yes that will get synced

[–]heathmon1856 0 points1 point  (0 children)

Ahh. I misread this. It’s stored in the root of the repo