I issued the command git reset HEAD@{1} and I got the following message
error: unknown switch `e'
The same command works fine from Git Bash
That's because curly braces have special meaning in PowerShell. You can either surround with single quotes or escape with backtick. For example:
git reset 'HEAD@{1}'
ah, good point. thanks
+1
@JayBazuzi, you're a lifesaver.
+1
@JayBazuzi Thank you!
Will there be a resolution for this in posh-git or do we always have to omit those with single quotes?
@JawadS this is an issue with PowerShell, not posh-git.
Hmm, Such a shame, I enjoyed using posh but a few issues like these forced me to switch back to git-bash
@JawadS - I think it makes sense to use whatever works best for you. I like poshgit and haven't found it limiting.
Most helpful comment
That's because curly braces have special meaning in PowerShell. You can either surround with single quotes or escape with backtick. For example: