2024-02-28 14:15:36 +00:00
|
|
|
---
|
|
|
|
author: Marc Beninca
|
|
|
|
date: 2024 / 03
|
2024-02-28 18:08:04 +00:00
|
|
|
lang: fr-FR
|
2024-02-28 16:43:10 +00:00
|
|
|
title: Git PPP
|
|
|
|
subtitle: Possibilités, Porcelaine & Plomberie
|
2024-02-28 14:15:36 +00:00
|
|
|
---
|
|
|
|
|
2024-02-28 16:43:10 +00:00
|
|
|
# Possibilités
|
|
|
|
|
2024-02-28 19:46:29 +00:00
|
|
|
1. Outils
|
|
|
|
1. Concepts
|
2024-02-28 16:43:10 +00:00
|
|
|
|
2024-02-28 19:46:29 +00:00
|
|
|
## Outils
|
|
|
|
|
|
|
|
### Hachage
|
2024-02-28 16:43:10 +00:00
|
|
|
|
|
|
|
::: incremental
|
|
|
|
* SHA-1
|
|
|
|
* SHA-256
|
|
|
|
:::
|
|
|
|
|
2024-02-28 19:46:29 +00:00
|
|
|
### Pointeurs
|
2024-02-28 16:43:10 +00:00
|
|
|
|
|
|
|
* branches
|
|
|
|
* étiquettes
|
|
|
|
|
2024-02-28 19:46:29 +00:00
|
|
|
# {-}
|
|
|
|
## Concepts
|
2024-02-28 16:43:10 +00:00
|
|
|
|
2024-02-28 19:46:29 +00:00
|
|
|
### Zones
|
2024-02-28 16:43:10 +00:00
|
|
|
|
|
|
|
::: incremental
|
|
|
|
* répertoire de travail
|
|
|
|
* index
|
|
|
|
* historique
|
|
|
|
:::
|
|
|
|
|
|
|
|
# Porcelaine
|
|
|
|
## 1
|
|
|
|
## 2
|
|
|
|
|
|
|
|
# Porcelaine → Bases
|
2024-02-28 17:03:45 +00:00
|
|
|
|
|
|
|
## git init
|
|
|
|
|
|
|
|
* bare | non-bare
|
|
|
|
|
|
|
|
## git config
|
|
|
|
|
|
|
|
* system → global → local
|
|
|
|
* user name & email
|
|
|
|
* description
|
|
|
|
|
|
|
|
## git status
|
|
|
|
|
|
|
|
* -u
|
2024-02-28 16:43:10 +00:00
|
|
|
|
2024-02-28 17:10:44 +00:00
|
|
|
# Porcelaine → Local
|
|
|
|
|
2024-02-28 17:22:05 +00:00
|
|
|
## 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
|
|
|
|
|
2024-02-28 17:10:44 +00:00
|
|
|
# Porcelaine → Collaborer
|
|
|
|
|
|
|
|
## Commandes
|
|
|
|
|
|
|
|
* git remote | clone
|
|
|
|
* git fetch | pull
|
|
|
|
* git push
|
|
|
|
* git tag
|
|
|
|
|
2024-02-28 16:43:10 +00:00
|
|
|
# Plomberie
|
2024-02-28 17:03:45 +00:00
|
|
|
|
|
|
|
## 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
|