When using git reset HEAD^
in your Zsh terminal, you may receive this error "fatal: ambiguous argument 'HEAD^': unknown revision or path not in the working tree."
If you do, you will have to add setopt NO_NOMATCH
in your ~/.zshrc
file to allow unmatched wildcard expressions.
Open your .zshrc
, then add the following
# Allow unmatched wildcard expressions in Zsh
setopt NO_NOMATCH
Then, just reload .zshrc
by typing source ~/.zshrc
in your terminal, and you shouldn't face any other issues when using git reset HEAD^
with the caret ^
symbols.
Happy Coding 🤠 Enjoy 😊
Top comments (0)