Ce mémo a été publié le 22 mai 2018 et peut contenir des informations qui peuvent être incomplètes, non mises à jour voir erronées du fait de son ancienneté.
N'hésitez pas à compléter votre recherche sur des articles plus récents.
Mémo quand un git pull dans PhpStorm retourne le message « cannot lock ref ‘refs/remotes/origin … ».
Fermer PhpStorm et ouvrir une console.
Exécuter ces commandes :
1 2 |
command git gc --prune=now command git remote prune origin |
Résultat :
1 2 3 4 5 6 7 |
$ git gc --prune=now Counting objects: 283770, done. Delta compression using up to 4 threads. Compressing objects: 100% (91831/91831), done. Writing objects: 100% (283770/283770), done. Total 283770 (delta 181851), reused 281923 (delta 180066) Checking connectivity: 283770, done. |
1 2 3 4 5 6 |
$ git remote prune origin Pruning origin URL: ssh://git.local/apl/repos.git * [pruned] origin/feature/branche1 * [pruned] origin/feature/branche2 * [pruned] origin/testAJE/branche3 |
Source : https://stackoverflow.com/a/7348934