>git fetch error: cannot lock ref 'refs/remotes/origin/xxx-branch': is at 8117caf7b1c88b2d5dfebd7581f6891d87b9abee but expected f38e8d35ae8ea7f177c537a98f4140dd76b8e2bd From xxxxxxx-git-url ! f38e8d35..9d7b8e7a xxx-branch -> origin/xxx-branch (unable to update local ref)
$ git gc --prune=now $ git remote prune origin
git-gc - Cleanup unnecessary files and optimize the local repository git gc [--aggressive] [--auto] [--quiet] [--prune= | --no-prune]
Runs a number of housekeeping tasks within the current >repository, such as compressing file revisions (to reduce disk space and increase performance) and removing unreachable objects which may have been created from prior invocations of git add. Users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance.
git-remote - manage set of tracked repositories git remote prune [-n | --dry-run]
Deletes all stale remote-tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are still locally available in "remotes/<name>".