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
tech:notes_git [2026/07/28 06:19] Jean-Baptistetech:notes_git [2026/07/28 06:21] (Version actuelle) Jean-Baptiste
Ligne 192: Ligne 192:
 ## Les branches ## Les branches
  
-How do I clean outdated 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. 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 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
 +
 +
 +
  
  
tech/notes_git.txt · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki