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/07/01 17:20] Jean-Baptistetech:notes_git [2026/07/29 14:22] (Version actuelle) Jean-Baptiste
Ligne 137: Ligne 137:
 * https://www.atlassian.com/fr/git/tutorials/comparing-workflows * https://www.atlassian.com/fr/git/tutorials/comparing-workflows
 * Git-flow * Git-flow
 +* https://linuxfr.org/forums/programmationautre/posts/git-rebase-conflits-worflow
  
  
Ligne 187: Ligne 188:
 git grep "foo()" git grep "foo()"
 ~~~ ~~~
 +
 +
 +
 +## Les branches
 +
 +### How do I clean outdated branches?
 +
 +git fetch --prune is the best utility for cleaning outdated branches. It will connect to a shared remote repository remote and fetch all remote branch refs. It will then delete remote refs that are no longer in use on the remote repository.
 +
 +~~~bash
 +git fetch --prune
 +~~~
 +
 +Source : https://www.atlassian.com/git/tutorials/git-prune
 +
 +
 +### Does git remote prune origin delete the local branch?
 +
 +~~~bash
 +git remote prune origin 
 +~~~
 +
 +No git remote prune origin will only delete the refs to remote branches that no longer exist. Git stores both local and remote refs. A repository will have local/origin and remote/origin ref collections. git remote prune origin will only prune the refs in remote/origin. This safely leaves local work in local/origin
 +
 +Source : https://www.atlassian.com/git/tutorials/git-prune
 +
 +
 +
  
  
Ligne 626: Ligne 655:
 ~~~ ~~~
  
-## 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.1782919239.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki