Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
it:git [2025/11/02 08:44] – vlpit:git [2026/08/31 08:00] (current) – external edit 127.0.0.1
Line 1: Line 1:
-## Stash+====== Git ======
  
-i.e. : éviter de laisser une pile de commit+===== Réécrire une pile de commits ===== 
 +<code bash> 
 +git rebase -i <commit_de_depart> 
 +git push --force-with-lease 
 +</code>
  
-**tig permet une visualisation plus esthetic de git show**+Utiliser `--force-with-lease` plutôt que `--force` pour éviter d'écraser des changements distants inattendus.
  
-    git rebase -i #####_git -1_du_premier_commit##### +===== Signer les commits ===== 
-    git push --force +<code bash> 
-     +git config user.signingkey vlp@fdn.fr 
-## Sign commit+git commit -S -m "update" 
 +git config --global commit.gpgsign true 
 +</code> 
 + 
 +===== Ajouter un second dépôt distant ===== 
 +<code bash> 
 +git remote add second_repo git@git_provider.com:vlp/my-project.git 
 +git remote set-url --add --push origin git@git_provider.com:vlp/my-project.git 
 +</code>
  
-    git config user.signingkey vlp@fdn.fr 
-    git commit -S -m "update" 
-    git config --global commit.gpgsign true // alway sign 
-     
-## add second repo 
-   git remote add second_repo git@git_provider.com:vlp/my-project.git 
-   git remote set-url --add --push origin git@git_provider.com:vlp/my-project.git