{{tag>Brouillon Pb git}} # Pb git ## 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 [...] -- [...]' ~~~ ### 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 ~~~ ## Err: The upstream branch of your current branch does not match the name of your current branch. ~~~ $ git push fatal: The upstream branch of your current branch does not match the name of your current branch. To push to the upstream branch on the remote, use git push origin HEAD:l12-prod To push to the branch of the same name on the remote, use git push origin HEAD To choose either option permanently, see push.default in 'git help config'. To avoid automatically configuring an upstream branch when its name won't match the local branch, see option 'simple' of branch.autoSetupMerge in 'git help config ~~~ ### Solution ~~~bash git branch --unset-upstream ~~~