+1

Merge local .gitignore file rules into root .gitignore file

Patrick Lehmann 5 years ago updated 5 years ago 1

With #309 (https://smartgit.userecho.com/communities/1/topics/309-ignore-file-ability-to-specify-which-gitignore-file-to-use), SmartGit got the ability to specify where to store ignore information.

Sometimes tools like PyCharm generate a local .gitignore file, when a new project is created in an existing repository. The project will have a global (.gitignore in the repositories root directory) and a local .gitignore file.

I would be great if one could merge or integrate the local file into the root .gitignore file.

Work items I could imagine:

  • offer a right-click menu on files, if these files are ".gitignore" files
  • copy rules from local file into root-directory file and extend the paths with the relative path from root to local directory
  • remove the local .gitignore file

local = repo/sub/dir/.gitignore

root = repo/.gitignore

The first example should be merged into the second example.