zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.73k stars 122 forks source link

[bug]: zinit self-update fails with a git error due to conflicting branches #609

Open jonatan-ivanov opened 6 months ago

jonatan-ivanov commented 6 months ago

What happened?

zinit self-update failed with a git error (due to conflicting branches).

Steps to reproduce

Run zinit self-update.

Relevant output

❯ zinit self-update
[self-update] fetching latest changes from main branch
error: cannot lock ref 'refs/remotes/origin/ci/speedup-zunit': 'refs/remotes/origin/ci' exists; cannot create 'refs/remotes/origin/ci/speedup-zunit'
error: some local refs could not be updated; try running
 'git remote prune origin' to remove any old, conflicting branches
From https://github.com/zdharma-continuum/zinit
 * branch              main       -> FETCH_HEAD
Already up to date.
[self-update] compiling zinit via zcompile
[self-update] reloading zinit for the current session

Screenshots and recordings

No response

Operating System & Version

OS: darwin22.0 | Vendor: apple | Machine: x86_64 | CPU: x86_64 | Processor: i386 | Hardware: x86_64

Zsh version

zsh 5.9 (x86_64-apple-darwin22.0)

Terminal emulator

xterm-256color // iTerm2

If using WSL on Windows, which version of WSL

None

Additional context

It seems there are conflicting branches, pruning them resolves the issue:

cd "$HOME/.zinit/bin"
git remote prune origin
git pull

Code of Conduct

vladdoster commented 6 months ago

@jonatan-ivanov,

Seems related to #606. Will prioritize a fix for this.

vladdoster commented 6 months ago

@jonatan-ivanov,

Seems related to #606. Will prioritize a fix for this.

Addendum: #606 is unrelated