Outils pour utilisateurs

Outils du site


informatique:git

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
informatique:git [27/11/2024 12:38] – [Docs] cyrilleinformatique:git [21/10/2026 09:40] (Version actuelle) – [Log & graph] cyrille
Ligne 155: Ligne 155:
   $ git stash pop   $ git stash pop
 </code> </code>
 +
 +=== refus de fusionner des historiques sans relation ===
 +
 +<code>
 +git pull --allow-unrelated-histories
 +</code>
 +
 === Merge only a specific commit === === Merge only a specific commit ===
  
Ligne 236: Ligne 243:
 Delete remote: Delete remote:
   git push origin --delete <branchName>   git push origin --delete <branchName>
 +
 +Des branches supprimées (local & remote) apparaissent toujours:
 +
 +<code>
 +$ git branch -a
 +* main
 +  remotes/origin/23_local_notification
 +  remotes/origin/25_adaptative_ux
 +  remotes/origin/2_homewidget
 +  remotes/origin/45_funny_ui
 +  remotes/origin/dusks-favorite-4
 +  remotes/origin/main
 +
 +$ git remote prune origin --dry-run 
 +Élimination de origin
 +URL : git@framagit.org:Cyrille37/wp-did-you-know-flutter.git
 + * [élaguerait] origin/23_local_notification
 + * [élaguerait] origin/25_adaptative_ux
 + * [élaguerait] origin/2_homewidget
 + * [élaguerait] origin/dusks-favorite-4
 +
 +$ git remote prune origin
 +Élimination de origin
 +URL : git@framagit.org:Cyrille37/wp-did-you-know-flutter.git
 + * [élagué] origin/23_local_notification
 + * [élagué] origin/25_adaptative_ux
 + * [élagué] origin/2_homewidget
 + * [élagué] origin/dusks-favorite-4
 +
 +$ git branch -a
 +* main
 +  remotes/origin/45_funny_ui
 +  remotes/origin/main
 +</code>
 +
 +=== Remove file from git ===
 +
 +Supprimer des fichiers du dépôt git sans les supprimer localement. Mais ça ne les enlève pas de l'historique.
 +
 +<code>
 +$ git rm --cached -r .opencode/
 +
 +$ git status
 +
 +Fichiers non suivis:
 +  (utilisez "git add <fichier>..." pour inclure dans ce qui sera validé)
 + .opencode/
 +</code>
  
 === Log & graph === === Log & graph ===
Ligne 241: Ligne 296:
 {{ :informatique:git:git-log-graph.png?nolink&400}} {{ :informatique:git:git-log-graph.png?nolink&400}}
  
-''git log --graph''+''git log --graph --all''
  
 +''git log --graph --oneline --branches --since="1 month ago" --decorate''
  
 ===== Tools ===== ===== Tools =====
informatique/git.1732707529.txt.gz · Dernière modification : de cyrille

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki