## Special syntax you can use in commit messages
- `Ref T123`, `Refs T123`or `Reference T123`: Attach the commit/differential to a Task
- `<prefix> Txxx <suffix>`, eg.: `Closes T123 as Wontfix`: Close a Task
- prefixes: closed, closes, close, fix, fixes, fixed, resolve, resolves, resolved, wontfix, wontfixes, wontfixed, invalidate, invalidates, invalidated, spite, spites, spited
- suffixes: out of spite, as spite, as invalid, as wontfix, as resolved, as fixed
- `Reverts rXabcdef`: Add reverted status to the commit: rPHTEST6144b027#936403
- prefixes: revert, reverts, reverted, backout, backsout, backedout, back out, backs out, backed out, undo, undoes
More information: https://secure.phabricator.com/T5132#69200
## Mirror repositories
You can mirror a remote repository into c4science or syncronize your c4science repository to an external platform. For that you have to go to the repository then
- {nav Actions > Manage Repository > URIs > New URI}
- Add the external repository URI
- Choose the mode of operation, I/O type
- Observe: the remote repository will be regularly checked for changes and they will be pulled into the c4science repo
- Mirror: the c4science repo will be pushed to the external repo as soon as there are some changes
- After creating the URI, if the repository needs credential (for the Mirror mode for instance) you can click on `Set Credential`on the right of the URI configuration and setup a key or username/password pair
More information: https://secure.phabricator.com/book/phabricator/article/diffusion_uris/
NOTE: In OBSERVE mode, you first have to edit the default URI to be `read-only` before adding a new URI.
## Webhooks and Herald
TBD
- Notification Engine: https://c4science.ch/herald/
- Webhook: https://c4science.ch/herald/webhook/
## Completly remove files from the GIT history (password, binary files)
As you may know, GIT is not suited to store binary files, it's made to handle source code in plain text. If you commited files by mistake, not everything is lost. We will use a great tootool called BFG, !
WARNING: This is a destructive process, please read the documentation carrefuly
- Install and configure Java for your computer
- Download the tool at https://rtyley.github.io/bfg-repo-cleaner/
- Identify the files you want to remove (if they are in the current version of the code)
```lang=bash
$ find -type f -exec ls -lh {} \; | awk '{print $5,$9}' | sort -h
```
- Remove specific files, including the latest version in the HEAD commit
```lang=bash
$ java -jar bfg.jar --no-blob-protection -D my-big-file.bin /path/to/repo
```
- You can also automatically remove files bigger than a certain value,
```lang=bash
$ java -jar bfg.jar --strip-blobs-bigger-than 10M /path/to/repo
```
- Or remove a particular string in a file and replace it with something else (if you commited a password or key)
```lang=bash
$ echo mypassword > /tmp/password.txt
$ java -jar bfg.jar --replace-text /tmp/password.txt /path/to/repo
```