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édente | |||
| tech:notes_git [2026/07/28 06:19] – Jean-Baptiste | tech: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:// | Source : https:// | ||
| + | |||
| + | |||
| + | ### 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/ | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | |||
| + | |||
tech/notes_git.txt · Dernière modification : de Jean-Baptiste
