-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated blueprint for git ignore with VS Code #3477
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it!
|
CLAs look good, thanks! |
Hi @phillip-haydon, We believe that VSCode settings are a personal thing and should not be committed to a team's repo. This will not be merged as it is easy to change if you're the only one using the repo and the more common case (git shared amongst multiple people) would not benefit from this. Cheers. |
@hansl You believe that... but VSCode believes different... https://twitter.com/code/status/806905092137881600
By ignoring it as default you prevent team settings. |
Can you add a flag to the cli to not generate a git ignore then? |
I would also prefer to have this PR in since VSCode user as myself. Nobody will get hurt if there is |
Apparently you're right; the TypeScript team suggests to have the VSCode folder committed. (also found this with more info). Apparently for personal settings you should use your user config, not the project one. My bad. I'll merge this. |
Thanks a lot @hansl |
Instead of whitelisting those 4 files and ignoring everything else, you may want to allow the whole folder, in case vscode adds more in the future. I think there are some extensions that keep workspace-specific files in that folder too. I'm not sure what you're expecting to exclude. |
The same reasoning could be applied to other IDEs like WebStorm; currently the whole |
@roblourens I was just following the git ignore GitHub template which I've used in the past. I'm unaware of any extensions that add files into the folder. But a lot modify the settings.json @mgol I'm sure there are problems in this git ignore for other Editors. But I have no experience in those to recommend any changes. |
I remain convinced that this is a personal/team matter. Remember that you can force-commit settings for your repository and team if you want. But the CLI should take a more conservative approach and should git-ignore them by default. My $0.02 |
@mgol |
@wardbell considering this is best practice from the VSCode team itself, I say it's safe to follow and tell people to ignore their whole vscode directory if it doesn't fit their need. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
https://github.com/github/gitignore/blob/a0df192f5271ad4d35a36c163d768e2db656b9fe/Global/VisualStudioCode.gitignore
Updated the git ignore template for VS Code Editor to not ignore the work-space settings.
Was trying to workout why everyone was having different indentation at work until I realised the default git ignore for vscode is really wrong :(