git/in/index.md
2024-03-10 21:35:56 +01:00

1.3 KiB

Concepts

  1. Outils
  2. Concepts

Outils

Hachage

::: incremental

  • SHA-1
  • SHA-256 :::

::: notes

  • versions ≥ 2.42 rétro-compatibles :::

DAG / GAO

::: incremental

  • Graphe
  • Acyclique
  • Orienté :::

Pointeurs

  • branches
  • étiquettes

{-}

Concepts

Zones

::: incremental

  • répertoire de travail
  • index
  • historique
  • réserve :::

Commandes

  1. Bases
  2. Local
  3. Collaborer

Bases

git init

  • bare | non-bare

git config

  • system → global → local
  • user name & email
  • description

git status

  • -u

{-}

Local

Commandes

  • git branch --force
  • git add
  • git commit
  • git checkout | switch
  • git worktree
  • git merge
    • fast-forward
    • three-way
  • git rebase
    • as-is
    • merge-squash
    • cherry-pick
    • interactive
  • git reflog

{-}

Collaborer

Commandes

  • git remote | clone
  • git fetch | pull
  • git push
  • git tag

Composants

  1. Basique
  2. Pointeurs
  3. Objets

Basique

  • .git/

    ::: incremental

    • config
    • description :::

{-}

Pointeurs

  • .git/refs/

    ::: incremental

    1. heads/branch
    2. remotes/remote/branch
    3. tags/tag :::

{-}

Objets

  • .git/objects
  • git cat-file -t|-p hash
  • git update-ref refs/heads/dev hash
  • git symbolic-ref HEAD refs/heads/main
  • git hash-object -w file
  • git update-index
  • git write-tree
  • git commit-tree