| 1 | == Introduction == |
| 2 | |
| 3 | ISSM's source code is hosted on [https://github.com/ISSMteam/ISSM GitHub]. Please consult the README for basic instructions for checking out a copy of the repository and committing changes. |
| 4 | |
| 5 | {{{#!comment |
| 6 | == Checking file status == |
| 7 | |
| 8 | == Updating == |
| 9 | |
| 10 | == Resolving conflicts == |
| 11 | }}} |
| 12 | |
| 13 | == Committing changes == |
| 14 | |
| 15 | === Before Committing === |
| 16 | |
| 17 | ==== Executables ==== |
| 18 | Files intended for execution, including scripts, must have the correct permissions in order to be able to be run. Set permissions with, |
| 19 | {{{ |
| 20 | sudo chmod 755 <file> |
| 21 | }}} |
| 22 | 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. |
| 23 | |
| 24 | ==== macOS Extended File Attributes ==== |
| 25 | 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. |
| 26 | |
| 27 | To remove all extended attributes on a given file, run, |
| 28 | {{{ |
| 29 | xattr -c <file> |
| 30 | }}} |
| 31 | |
| 32 | To remove all extended attributes on all files in a directory, run, |
| 33 | {{{ |
| 34 | xattr -c $(ls <path>) |
| 35 | }}} |
| 36 | |
| 37 | To remove all extended attributes on all files in the ISSM directory, recursively, run, |
| 38 | {{{ |
| 39 | for file in $(find $ISSM_DIR -not \( -path '*/\.*' -prune \)); do if [[ ! $file = "." ]]; then xattr -c $file; fi; done |
| 40 | }}} |
| 41 | |
| 42 | ==== Correcting Permissions and/or Extended Attributes on Files That Have Already Been Committed ==== |
| 43 | If you have committed a file with incorrect files permissions or unwanted extended attributes, you must, |
| 44 | 1. Copy the file to a temporary location (copying and pasting to a new text document will suffice). |
| 45 | 2. Delete the file from the repository. |
| 46 | 3. Create a new file with the same name in your local copy of the repository. |
| 47 | 4. Copy the contents of the original file into this new file. |
| 48 | 5. Modify permissions and/or extended attributes on the new file. |
| 49 | 6. Commit the new file to the repository. |