Ckeditor5: Consider adding more entries to gitignore

Created on 29 Nov 2017  Â·  9Comments  Â·  Source: ckeditor/ckeditor5

Wouldn't be nice to add other files used in development to .gitignore:

  • npm-debug.log (shouldn't occur in newer NPM but it might)
  • .idea directory - some of guys (like me) are using PHP/WebStorm IDE so I'd like to add this one at least.

Any other files that commonly cause problems?

question

Most helpful comment

.idea directory - some of guys (like me) are using PHP/WebStorm IDE so I'd like to add this one at least.

Global git ignore file - everybody should have defined this file. IDE files aren't part of the project and should not be defined in project .gitignore file.

All 9 comments

.idea directory - some of guys (like me) are using PHP/WebStorm IDE so I'd like to add this one at least.

Global git ignore file - everybody should have defined this file. IDE files aren't part of the project and should not be defined in project .gitignore file.

@pomek what if I want some files from .idea folder in other projects? Then global .gitignore isn't a solution.

Some files from .idea direcotry might be shared through git. Also this SO.

@pomek what if I want some files from .idea folder in other projects?

The first one – git add --force .idea/important_for_others_file – but I don't recommend this.

In this case, you should create a template file (which should not lead to .idea directory) which should be copied after pulling the changes in the repository.

And the main question which you should answer – what if I don't have *Storm IDE? I will have a .idea directory with files which are totally unnecessary.

And one more solution for ignoring .idea directory for the specific project.

git update-index --assume-unchanged .idea

You don't touch .gitignore and .gitignore-global file but the directory isn't tracked.

You don't touch .gitignore and .gitignore-global file but the directory isn't tracked.

git update-index --assume-unchanged .idea/ does not work as intended.

On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        .idea/

nothing added to commit but untracked files present (use "git add" to track)

And the main question which you should answer – what if I don't have *Storm IDE?

It's just a preference of other project - irrelevant for this discussion. Only a hint that I would like to not add .idea to global gitignore.

In this case, you should create a template file

It's not a template files but again please don't assume other things other then that:

  • it would be nice to ignore .idea folder for CKE5 projects
  • don't ignore .idea folder globally

git update-index --assume-unchanged .idea

This looks like an ugly hack.

The proper way of ignoring file locally is by adding it to .git/info/exclude. You can also set core.excludesFile in your .gitconfig what can be done per project or globally on your system. See: https://git-scm.com/docs/gitignore

I think that PHP/WebStorm users can simply configure their git config it ignore .idea folder in all projects. It should be a system configuration, not project configuration.

@pjasiun solution looks better. Closing this as it never gonna happen ;)

As I was searching for this: I've ended up configuring PHPStorm's Version Control to ignore .idea folder for this project only.

selection_030

ps.: highlighted .eslintignore is also ignored to fix some issue with ESLint integration with PHPStorm.

Was this page helpful?
0 / 5 - 0 ratings