Skip to content

Instantly share code, notes, and snippets.

@Luxato
Created March 19, 2020 09:58
Show Gist options
  • Save Luxato/d7200830459dc8861207f12dda3056c5 to your computer and use it in GitHub Desktop.
Save Luxato/d7200830459dc8861207f12dda3056c5 to your computer and use it in GitHub Desktop.
Git remove orphaned objects
# This will fix errors like this
# error: update_ref failed for ref 'refs/remotes/origin/lukas': cannot lock ref 'refs/remotes/origin/lukas': 'refs/remotes/origin/lukas/css' exists;
# cannot create 'refs/remotes/origin/lukas'
git gc --prune=now
git remote prune origin
git pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment