|
|
Here are listes some usefull tools to know for dev.
|
|
|
Here are listed some useful tools to know for development.
|
|
|
|
|
|
## Git
|
|
|
|
... | ... | @@ -8,10 +8,9 @@ Here are listes some usefull tools to know for dev. |
|
|
|
|
|
Since Git 2.13, it is possible to define config files for directories.
|
|
|
|
|
|
Example: the file `~/dev/dbnomics` define user email for all dbnomics repositories:
|
|
|
Example: the file `~/dev/dbnomics` define user email for all DB.nomics repositories:
|
|
|
|
|
|
* in `~/.gitconfig`:
|
|
|
|
|
|
```ini
|
|
|
[includeIf "gitdir:~/dev/dbnomics/"]
|
|
|
path = ~/dev/dbnomics/gitconfig
|
... | ... | @@ -23,7 +22,7 @@ Example: the file `~/dev/dbnomics` define user email for all dbnomics repositori |
|
|
email = jc.dus@cepremap.org
|
|
|
```
|
|
|
|
|
|
##### Multiple config files (one in the subtree of the other)
|
|
|
##### Multiple config files (one in the sub-tree of the other)
|
|
|
|
|
|
Example:
|
|
|
|
... | ... | @@ -34,13 +33,24 @@ Example: |
|
|
path = ~/dev/dbnomics/gitconfig
|
|
|
```
|
|
|
|
|
|
#### Preventing git from auto-generating email adress (user@host):
|
|
|
#### Forcing git to use a manually configured email address
|
|
|
|
|
|
```
|
|
|
```ini
|
|
|
[user]
|
|
|
useConfigOnly = true
|
|
|
```
|
|
|
|
|
|
#### Delete local image of remote branches when fetching
|
|
|
|
|
|
After a merge request is approved and the branch merged, the branch is deleted on the server. On the machine of the developer, it is irrelevant to keep those polluting branches.
|
|
|
|
|
|
This setting makes git delete local branches when their remote branches were deleted on the server.
|
|
|
|
|
|
```ini
|
|
|
[fetch]
|
|
|
prune = true
|
|
|
```
|
|
|
|
|
|
### Good commit messages
|
|
|
|
|
|
https://chris.beams.io/posts/git-commit/
|
... | ... | |