Introduction
ISSM's source code is hosted on GitHub. Please consult the README for basic instructions for checking out a copy of the repository and committing changes.
Committing changes
Before Committing
Executables
Files intended for execution, including scripts, must have the correct permissions in order to be able to be run. Set permissions with,
sudo chmod 755 <file>
before committing to ensure that other users who check out a copy can execute the file, as intended, without having to first set permissions on the file locally.
macOS Extended File Attributes
On macOS, running ls -la
in a Terminal may reveal one or more files that have extended attributes, denoted by '@' in the rightmost field. Extended attributes store extra, potentially personally identifiable information (i.e. the author's name). If you are developing on a Mac, it is important to remove such information from files before committing.
To remove all extended attributes on a given file, run,
xattr -c <file>
To remove all extended attributes on all files in a directory, run,
xattr -c $(ls <path>)
To remove all extended attributes on all files in the ISSM directory, recursively, run,
for file in $(find $ISSM_DIR -not \( -path '*/\.*' -prune \)); do if [[ ! $file = "." ]]; then xattr -c $file; fi; done
Correcting Permissions and/or Extended Attributes on Files That Have Already Been Committed
If you have committed a file with incorrect files permissions or unwanted extended attributes, you must,
- Copy the file to a temporary location (copying and pasting to a new text document will suffice).
- Delete the file from the repository.
- Create a new file with the same name in your local copy of the repository.
- Copy the contents of the original file into this new file.
- Modify permissions and/or extended attributes on the new file.
- Commit the new file to the repository.