I wonder if there is an equivalent method to git's .gitignore file for ignoring files to be sourced controlled in IBM Rational ClearCase?
I do not want to have some files, e.g. eclipse specific files, accidentially added to the source control.
I wonder if there is an equivalent method to git's .gitignore file for ignoring files to be sourced controlled in IBM Rational ClearCase?
I do not want to have some files, e.g. eclipse specific files, accidentially added to the source control.
Create a site specific AAA.magic next to the default.magic location.
Include patterns for files you do not want. Look at the main default.magic and read the ClearCase docs about magic for more options.
These are some VisualStudio files (*.suo, *.user) that I do not want.
The user will see an error like:
Error adding 'M:\a\b\c.user' to source control.
Suggested element type(s) unknown: DO_NOT_CHECKIN
Can't pick element type from rules in "...."
Add lines like this to your AAA.magic file
# These will generate an error on checkin due to missing eltype
DO_NOT_CHECKIN : -name "*.[Uu][Ss][Ee][Rr]" ;
DO_NOT_CHECKIN : -name "*.[Ss][Uu][Oo]" ;
Not natively supported.
For files already added, but that needs to be ignored from now on, you can add a config spec selection rule "element /path/to/file -none
"
For files not yet added to source control, there is no easy solution, except making a pre-op trigger on add to source control operation (mkelem
), which would call a script in charge of parsing a custom "ignore" file, and which would accept or deny the "add to source control" operation to proceed.
See also "ClearCase delete view private files only" (Apr. 2013, one year after this answer), which helps to clean up private files.