GIT : 40 problèmes, 40 solutions

40 réponses aux questions les plus posées sur GIT : switch, rebase, merge, cherry-pick, branch, stash, erreurs et problèmes courants.

40 réponses aux questions les plus posées sur GIT : switch, rebase, merge, cherry-pick, branch, stash, erreurs et problèmes courants.

  • 00:53 Comment créer un projet git ?
  • 01:26 Comment changer le nom de la branche git principale ?
  • 01:46 Comment configurer son identité git locale ?
  • 02:23 Comment configurer son éditeur par défaut (+ merge & diff) ?
  • 02:53 Comment ajouter, modifier, visualiser l’état des fichiers ?
  • 03:42 Comment créer un dépôt git pour mon réseau local (ou global) ?
  • 04:41 Comment cloner un projet git ?
  • 04:59 Comment créer une branche git ?
  • 06:08 Comment connaître la branche git courante ?
  • 06:37 Comment pousser une branche git et automatiser set-upstream ?
  • 07:31 Comment créer un alias git (qui affiche l’arbre des commits) ?
  • 08:02 Comment récupérer une branche git depuis le serveur ?
  • 08:32 Comment ignorer certains fichiers avec git ?
  • 09:13 Comment ajouter un répertoire vide dans un dépôt git ?
  • 09:57 Comment supprimer un fichier qui était traqué mais qui maintenant est dans .gitignore ?
  • 10:40 Quelle est la différence entre “git add -A” et “git add .” ?
  • 11:19 Comment modifier un message de commit git qui n’a pas été pushé ?
  • 11:38 Comment modifier mon dernier commit git ?
  • 12:18 Comment nettoyer des fichiers locaux non suivis (et suivis) avec git ?
  • 13:05 Error :  You have divergent branches and need to specify how to reconcile them.
  • 14:22 Comment annuler un “git add” ?
  • 15:15 Quelle est la différence entre “git pull” et “git fetch” ?
  • 15:46 Comment forcer un “git pull” pour écraser les modifications locales ?
  • 16:17 Comment annuler le dernier commit local ?
  • 17:28 Comment récupérer un commit supprimé avec git reset –hard ?
  • 18:02 Comment réparer un “head détaché” ?
  • 18:59 Comment gérer la suppression d’un commit git distant ?
  • 19:26 Comment renommer une branche git locale et distante ?
  • 20:06 Comment lier une branche locale à une branche distante avec git ?
  • 20:33 Comment déplacer le ou les derniers commit(s) dans une nouvelle branche ?
  • 21:12 Comment stasher des fichiers non suivis ou ignorés ?
  • 22:58 Comment annuler un “git rebase” ?
  • 23:44 Comment faire un reset de ma branche pour revenir sur le HEAD distant ?
  • 24:04 Comment copier un commit d’une branche à une autre ? (git cherry-pick)
  • 24:57 Comment fusionner une branche (git merge) ?
  • 25:13 Comment supprimer une branche en local et sur le serveur ?
  • 25:34 Comment rebaser les branches après un merge sur main (avec un git cherry-pick) ?
  • 27:01 Comment sauvegarder mes modifications locales pendant un rebase ? (git stash)
  • 27:55 Comment résoudre un conflit avec git ?
  • 28:57 Comment modifier l’uri / url du repository git distant ?

Petit alias pratique à ajouter à ~/.gitconfig pour obtenir la commande git tree :

[alias]  
   tree = !"git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue  
)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(r  
eset)%C(auto)%d%C(reset)"
Expertise et veille technologique - Linux, DevOps, OpenSource
Généré avec Hugo
Thème Stack conçu par Jimmy