# Github / Gitlab

## Common

### create patch from commit

add 
* `.patch` for a patch file or
* `.diff` for a plain diff file

as a suffix onto commit links or merge request links.

examples:
* [https://github.com/magento/magento2/commit/18dee3d979ed8ee68a44324e892e6b7f570c987c.diff](https://github.com/magento/magento2/commit/18dee3d979ed8ee68a44324e892e6b7f570c987c.diff)

## Gitlab special

### gitlab personal access token
* go to `https://gitlab.com/-/profile/personal_access_tokens`
	* rights: `read_repository` and `write_repository`
    * add line in `~/.git-credentials`: `https://private-token:{{token}}@gitlab.com`