Skip to content
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

Merged
merged 1 commit into from
Dec 8, 2016

Conversation

phillip-haydon
Copy link
Contributor

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 :(

@googlebot
Copy link

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!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@phillip-haydon
Copy link
Contributor Author

phillip-haydon commented Dec 8, 2016 via email

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Dec 8, 2016
@hansl
Copy link
Contributor

hansl commented Dec 8, 2016

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 hansl closed this Dec 8, 2016
@phillip-haydon
Copy link
Contributor Author

@hansl You believe that... but VSCode believes different...

https://twitter.com/code/status/806905092137881600

Visual Studio Code @code 49m
@philliphaydon you cannot - the .vscode folder ideally should not be ignored.

By ignoring it as default you prevent team settings.

@phillip-haydon
Copy link
Contributor Author

Can you add a flag to the cli to not generate a git ignore then?

@jkuri
Copy link
Contributor

jkuri commented Dec 8, 2016

I would also prefer to have this PR in since VSCode user as myself. Nobody will get hurt if there is .vscode folder in, I think.

@hansl
Copy link
Contributor

hansl commented Dec 8, 2016

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.

@hansl hansl reopened this Dec 8, 2016
@hansl hansl merged commit 8d88446 into angular:master Dec 8, 2016
@phillip-haydon
Copy link
Contributor Author

Thanks a lot @hansl

@roblourens
Copy link

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.

@mgol
Copy link
Member

mgol commented Dec 8, 2016

The same reasoning could be applied to other IDEs like WebStorm; currently the whole .idea folder is ignored.

@phillip-haydon
Copy link
Contributor Author

@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.

@wardbell
Copy link
Contributor

wardbell commented Dec 8, 2016

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

@hansl
Copy link
Contributor

hansl commented Dec 8, 2016

@mgol .idea is different because WebStorm puts everything (personal configurations and project configurations) into a single file. We would have to ignore parts of .idea/workspace.xml which is impossible with git.

@hansl
Copy link
Contributor

hansl commented Dec 8, 2016

@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.

@phillip-haydon phillip-haydon deleted the gitignore-vscode branch December 16, 2016 01:52
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this pull request Feb 9, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants