153 lines
1.6 KiB
Markdown
153 lines
1.6 KiB
Markdown
---
|
|
author: Marc Beninca
|
|
date: 2024 / 03
|
|
lang: fr-FR
|
|
title: Git PPP
|
|
subtitle: Possibilités, Porcelaine & Plomberie
|
|
---
|
|
|
|
# Plan {-}
|
|
|
|
::: {.columns}
|
|
::: {.column width="33%"}
|
|
* Possibilités
|
|
* Outils
|
|
* Concepts
|
|
:::
|
|
::: {.column width="33%"}
|
|
* Porcelaine
|
|
* Bases
|
|
* Local
|
|
* Collaborer
|
|
:::
|
|
::: {.column width="33%"}
|
|
* Plomberie
|
|
* Basique
|
|
* Pointeurs
|
|
* Objets
|
|
:::
|
|
:::
|
|
|
|
# Possibilités
|
|
|
|
1. Outils
|
|
1. Concepts
|
|
|
|
## Outils
|
|
|
|
### Hachage
|
|
|
|
::: incremental
|
|
* SHA-1
|
|
* SHA-256
|
|
:::
|
|
|
|
::: notes
|
|
* versions ≥ 2.42 rétro-compatibles
|
|
:::
|
|
|
|
### Pointeurs
|
|
|
|
* branches
|
|
* étiquettes
|
|
|
|
# {-}
|
|
## Concepts
|
|
|
|
### Zones
|
|
|
|
::: incremental
|
|
* répertoire de travail
|
|
* index
|
|
* historique
|
|
:::
|
|
|
|
# Porcelaine
|
|
|
|
1. Bases
|
|
1. Local
|
|
1. 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
|
|
|
|
# Plomberie
|
|
|
|
1. Basique
|
|
1. Pointeurs
|
|
1. Objets
|
|
|
|
## Basique
|
|
|
|
* .git/
|
|
|
|
::: incremental
|
|
* config
|
|
* description
|
|
:::
|
|
|
|
# {-}
|
|
## Pointeurs
|
|
|
|
* .git/refs/
|
|
|
|
::: incremental
|
|
1. heads/branch
|
|
1. remotes/remote/branch
|
|
1. 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
|