Programmation

Git intermédiaire

stash, reflog, rebase local, cherry-pick, tags et hooks — le quotidien d’équipe après add/commit/push, sans force push.

  1. 01Leçon

    Une introduction, puis des exemples à taper.

  2. 02Exercices

    Écrire soi-même, avec un critère de réussite.

  3. 03Quiz

    Cinq questions. Toutes justes pour valider.

À propos

Introduction

Vous savez add, commit, une branche, push/pull, résoudre un conflit. Ici : mettre de côté (stash), retrouver (reflog), rejouer des commits (rebase local, cherry-pick), étiqueter, un hook. On n’enseigne pas le force push sur main.

Neuf modules, comme Python intermédiaire. Amina, Jean, Grâce, dépôt YekoSkills d’exercice.

Prérequis : cours Git & GitHub. Git 2.30+.

Objectifs

  • stash / pop / drop
  • reflog pour récupérer un commit « perdu »
  • rebase sur une branche locale non publiée
  • cherry-pick et revert
  • tags annotés et hook pre-commit léger
  • bisect, worktree, .gitattributes, aperçu GitHub Actions

Programme

9 modules · 45 leçons

  1. 01

    stash et reflog

    Interrompre sans commit poubelle.

    • git stashLeçon · 80 min
    • reflogLeçon · 75 min
    • Atelier : stash notes.txtLeçon · 55 min
    • TD : stash puis récupérerExercice · 40 min
    • QCM : stash reflogQuiz · 12 min
  2. 02

    rebase local

    Historique linéaire sur une branche à vous.

    • rebase sur main localLeçon · 80 min
    • conflit pendant rebaseLeçon · 75 min
    • Atelier : rebase d’une feature localeLeçon · 55 min
    • TD : rebase d’une featureExercice · 40 min
    • QCM : rebaseQuiz · 12 min
  3. 03

    cherry-pick et revert

    Un commit visé, pas tout le branch.

    • cherry-pickLeçon · 75 min
    • revertLeçon · 75 min
    • Atelier : cherry-pick un fixLeçon · 55 min
    • TD : porter un fixExercice · 40 min
    • QCM : cherry revertQuiz · 12 min
  4. 04

    Tags

    Nommer une version, pas une branche.

    • tag annotéLeçon · 75 min
    • pousser les tagsLeçon · 70 min
    • Atelier : tag v1.0.0Leçon · 55 min
    • TD : tag 1.0.0Exercice · 40 min
    • QCM : tagsQuiz · 12 min
  5. 05

    Hooks

    Un script local avant le commit.

    • pre-commitLeçon · 75 min
    • exemple messageLeçon · 70 min
    • Atelier : pre-commit TODOLeçon · 55 min
    • TD : refuser un commit vide de messageExercice · 40 min
    • QCM : hooksQuiz · 12 min
  6. 06

    bisect

    Trouver le commit qui casse.

    • bisect startLeçon · 80 min
    • good/badLeçon · 75 min
    • Atelier : bisect resetLeçon · 55 min
    • TD : retrouver un oopsExercice · 40 min
    • QCM : bisectQuiz · 12 min
  7. 07

    worktree

    Deux branches, deux dossiers.

    • worktree addLeçon · 80 min
    • removeLeçon · 75 min
    • Atelier : worktree listLeçon · 55 min
    • TD : hotfix à côtéExercice · 40 min
    • QCM : worktreeQuiz · 12 min
  8. 08

    .gitattributes

    eol, linguist, export-ignore.

    • eol=lfLeçon · 80 min
    • text=autoLeçon · 75 min
    • Atelier : .gitattributesLeçon · 55 min
    • TD : .gitattributes lfExercice · 40 min
    • QCM : attributesQuiz · 12 min
  9. 09

    GitHub Actions aperçu

    Un workflow test, pas un cours CI complet.

    • yaml workflowLeçon · 80 min
    • on pushLeçon · 75 min
    • Atelier : lire un YAMLLeçon · 55 min
    • TD : lire un workflowExercice · 40 min
    • QCM : ActionsQuiz · 12 min