tech:notes_git
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:notes_git [2026/06/07 19:12] – modification externe 127.0.0.1 | tech:notes_git [2026/07/01 17:36] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 415: | Ligne 415: | ||
| ~~~ | ~~~ | ||
| + | ~~~bash | ||
| + | # Checkout the stable branch and find just the latest tag | ||
| + | git checkout master | ||
| + | git describe --abbrev=0 --tags | ||
| + | git tag --sort | ||
| + | ~~~ | ||
| - | # # Checkout the stable branch and find just the latest tag | ||
| - | # git checkout master | ||
| - | # git describe --abbrev=0 --tags | ||
| - | # git tag --sort | ||
| - | + | undo git add | |
| - | undo `git add` | + | |
| ~~~bash | ~~~bash | ||
| git reset HEAD -- plop | git reset HEAD -- plop | ||
| Ligne 430: | Ligne 431: | ||
| git rm --cached plop | git rm --cached plop | ||
| - | #Suprimer le stagging | + | # Suprimer le stagging |
| git reset | git reset | ||
| + | |||
| + | # Ou | ||
| + | git restore --staged < | ||
| ~~~ | ~~~ | ||
| Ligne 622: | Ligne 626: | ||
| ~~~ | ~~~ | ||
| - | ## Pb | ||
| - | ### pb git reset --hard ne fonctionne pas | ||
| - | |||
| - | #### Solution | ||
| - | |||
| - | Utiliser `git checkout HEAD` | ||
| - | ~~~bash | ||
| - | #git reset --hard vars/ | ||
| - | git checkout HEAD vars/ | ||
| - | ~~~ | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | ### Err: unknown revision or path not in the working tree. | ||
| - | |||
| - | ~~~ | ||
| - | $ git reset preseed/ | ||
| - | fatal: ambiguous argument ' | ||
| - | Use ' | ||
| - | 'git < | ||
| - | ~~~ | ||
| - | |||
| - | |||
| - | #### Solution | ||
| - | |||
| - | ~~~bash | ||
| - | git checkout HEAD -- vars/ | ||
| - | ~~~ | ||
| - | |||
| - | |||
| - | ### Pb git diff et git difftool ne fonctionne pas | ||
| - | |||
| - | #### Solution | ||
| - | |||
| - | Utiliser l' | ||
| - | |||
| - | ~~~bash | ||
| - | git difftool --cached | ||
| - | ~~~ | ||
| - | |||
| - | Ou encore | ||
| - | ~~~bash | ||
| - | git difftool HEAD | ||
| - | ~~~ | ||
tech/notes_git.1780852327.txt.gz · Dernière modification : de 127.0.0.1
