Outils pour utilisateurs

Outils du site


tech:notes_git

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_git [2026/06/25 11:20] Jean-Baptistetech:notes_git [2026/07/01 17:36] (Version actuelle) Jean-Baptiste
Ligne 423: Ligne 423:
  
  
-undo `git add`+undo git add
 ~~~bash ~~~bash
 git reset HEAD -- plop git reset HEAD -- plop
Ligne 431: Ligne 431:
 git rm --cached plop git rm --cached plop
  
-#Suprimer le stagging+# Suprimer le stagging
 git reset git reset
 +
 +# Ou 
 +git restore --staged <file>...
 ~~~ ~~~
  
Ligne 623: Ligne 626:
 ~~~ ~~~
  
-## Pb 
  
-### pb git reset --hard ne fonctionne pas 
- 
-#### Solution 
- 
-Utiliser `git checkout HEAD` 
-~~~bash 
-#git reset --hard vars/phy-deb9-fr.var 
-git checkout HEAD vars/phy-deb9-fr.var 
-~~~ 
- 
- 
- 
- 
- 
-### Err: unknown revision or path not in the working tree. 
- 
-~~~ 
-$ git reset preseed/kvm-deb10.cfg vars/netinst-deb8-11.var 
-fatal: ambiguous argument 'preseed/kvm-deb10.cfg': unknown revision or path not in the working tree. 
-Use '--' to separate paths from revisions, like this: 
-'git <command> [<revision>...] -- [<yourcode>...]' 
-~~~ 
- 
- 
-#### Solution 
- 
-~~~bash 
-git checkout HEAD -- vars/kvm-deb10.var preseed/kvm-deb10.cfg 
-~~~ 
- 
- 
-### Pb git diff et git difftool ne fonctionne pas 
- 
-#### Solution 
- 
-Utiliser l'option `--cached` 
- 
-~~~bash 
-git difftool --cached 
-~~~ 
- 
-Ou encore 
-~~~bash 
-git difftool HEAD 
-~~~ 
  
  
tech/notes_git.1782379239.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki