#gitignore and vscode folder

1 messages · Page 1 of 1 (latest)

barren salmon
#

Hello, might be a stupid question.
About .gitignore, how should we treat .vscode/ and .idea/ folders (IDE specific files)? Is there standard answers?

  • I use Unity.gitignore from GitHub/gitignore repo as default, but there's no clue about them.
  • I know the brute-force answer is to just ignore them, and I guess many people do like this.
  • Another people says there are something need to be shared, since they are not cache folder like .vs/ but workspace settings, e.g. .vscode/launch.json.
  • I want to see if there's any "standard" or "default" answer or other insight, like side effects or something else.
copper whale
#

If you're working with other people, add them to the ignore.

If you're working solo on multiple machines, do whatever you want, keep or ignore.

barren salmon
runic canopy
#

The fact that you're seeing multiple different opinions should be a clue that it's a matter of opinion/preference and there is no universal truth that you could find that tells you what to do

#

If you want to enforce the same settings for all team members, include the folders in the repo. Usually people use their personal settings and would find that annoying.

#

Some teams make macros and shortcuts and want them to be shared

barren salmon
#

Since I always stay in small/medium studio, I always just ignore those folder, since there're always something changing. But I really don't know what happened in bigger teams. My experience does not give me enough confident for this question.
Maybe I should ask from another aspect:
Did anyone meet the actual case that need to upload them to Git?

copper whale
#

Nitku already gave you examples of why it would be shared.

runic canopy
#

Also "share things like launch configurations" from one of the linked Github issues. Bigger teams might have that kind of custom workflows

barren salmon
#

I see....I'm swallowing the "no universal truth" part.
Thanks guys!

runic canopy
#

A good rule of thumb is that if you don't have a reason to include them in the repo, start with not sharing them. If you later do need to do that it's just a matter of removing one line from gitignore