Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| it:git [2024/04/19 13:14] – [Memo] 86.127.225.158 | 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 | ||
| + | </ | ||
| - | git rebase -i #####_git -1_du_premier_commit##### | + | ===== Ajouter un second dépôt distant ===== |
| - | git push --forc | + | <code bash> |
| - | + | git remote add second_repo | |
| - | + | git remote set-url --add --push origin git@git_provider.com:vlp/my-project.git | |
| - | ## sign commit | + | </ |
| - | + | ||
| - | | + | |
| - | git commit | + | |
| - | git config | + | |
| - | + | ||
| - | e | + | |
