Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| it:git [2023/02/15 08:29] – created - external edit 127.0.0.1 | it:git [2026/08/31 08:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | # Memo | + | ====== Git ====== |
| - | ## Stash | + | ===== Réécrire une pile de commits ===== |
| + | <code bash> | ||
| + | git rebase -i < | ||
| + | git push --force-with-lease | ||
| + | </ | ||
| - | i.e. : éviter de laisser une pile de commit | + | Utiliser `--force-with-lease` plutôt que `--force` pour éviter d' |
| - | **tig permet une visualisation plus esthetic de git show** | + | ===== Signer les commits ===== |
| + | <code bash> | ||
| + | git config user.signingkey vlp@fdn.fr | ||
| + | git commit -S -m " | ||
| + | git config --global commit.gpgsign true | ||
| + | </ | ||
| - | | + | ===== Ajouter un second dépôt distant ===== |
| - | git push --force | + | <code bash> |
| + | git remote add second_repo git@git_provider.com: | ||
| + | git remote set-url --add --push origin git@git_provider.com: | ||
| + | </ | ||
