atomist-attic / artifact-source

ArtifactSource abstraction for source code
GNU General Public License v3.0
2 stars 3 forks source link

Use .atomistignore over .gitignore (if present) #8

Closed kipz closed 7 years ago

kipz commented 7 years ago

We need to be able to ignore some files for git checkin, but allow them for adding to an archive. For example, node_modules.

Override mechanics should probably look like .npmignore:

https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package

alankstewart commented 7 years ago

@kipz @cd I've add the .atomistignore functionality as close possible as what the .npmignore doc says above. As per .npmignore, it will consider all .atomistignore files found in the root of the project and its subdirectories. Unlike .gitignore which always ignores directories like ".git" I also added .git and a few other artefacts that are ignored by default - some of which are listed in the .npmignore doc (e.g. .git, .svn, .idea, *.iml, and eclipse project hidden files. But if you don't want these added, let me know.

If a .atomistignore file is not found, then the global .gitgnore file is read along with any .gitignore files in the project root and subdirectories.

Note, like .npmignore, if a .atomistignore file is present, even if empty, it will override anything in .gitignore files (if present)

Available in release 0.11.1

kipz commented 7 years ago

Great! :)

On 6 Dec 2016, at 04:23, Alan Stewart <notifications@github.com mailto:notifications@github.com> wrote:

@kipz https://github.com/kipz @cd https://github.com/cd I've add the .atomistignore functionality as close possible as what the .npmignore doc says above. As per .npmignore, it will consider all .atomistignore files found in the root of the project and its subdirectories. Unlike .gitignore which always ignores directories like ".git" I also added .git and a few other artefacts that are ignored by default - some of which are listed in the .npmignore doc (e.g. .git, .svn, .idea, *.iml, and eclipse project hidden files. But if you don't want these added, let me know.

If a .atomistignore file is not found, then the global .gitgnore file is read along with any .gitignore files in the project root and subdirectories.

Note, like .npmignore, if a .atomistignore file is present, even if empty, it will override anything in .gitignore files (if present)

Available in release 0.11.0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atomist/artifact-source/issues/8#issuecomment-265057254, or mute the thread https://github.com/notifications/unsubscribe-auth/ABx1QjNyztNjrYigfDuDL35H40tH1CCYks5rFONEgaJpZM4LE0VH.

alankstewart commented 7 years ago

artifact-source now uses JGit to process .gitignore files, and also supports a .atomist/ignore file to allow ignoring files under .atomist or to negate patterns matched in .gitignore processing