New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git reset HEAD@{1} results in error #106

Closed
kenwarner opened this Issue Jul 13, 2013 · 10 comments

Comments

Projects
None yet
7 participants
@kenwarner

kenwarner commented Jul 13, 2013

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

@JayBazuzi

This comment has been minimized.

Collaborator

JayBazuzi commented Jul 13, 2013

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}'
@kenwarner

This comment has been minimized.

kenwarner commented Jul 13, 2013

ah, good point. thanks

@kenwarner kenwarner closed this Jul 13, 2013

@codler

This comment has been minimized.

codler commented Oct 19, 2014

+1

@dougludlow

This comment has been minimized.

dougludlow commented Mar 2, 2015

@JayBazuzi, you're a lifesaver.

@taeguk

This comment has been minimized.

taeguk commented Dec 26, 2015

+1

@Far3

This comment has been minimized.

Far3 commented Apr 14, 2016

@JayBazuzi Thank you!

@JawadS

This comment has been minimized.

JawadS commented Nov 14, 2016

Will there be a resolution for this in posh-git or do we always have to omit those with single quotes?

@dougludlow

This comment has been minimized.

dougludlow commented Nov 14, 2016

@JawadS this is an issue with PowerShell, not posh-git.

@JawadS

This comment has been minimized.

JawadS commented Nov 14, 2016

Hmm, Such a shame, I enjoyed using posh but a few issues like these forced me to switch back to git-bash

@dougludlow

This comment has been minimized.

dougludlow commented Nov 14, 2016

@JawadS - I think it makes sense to use whatever works best for you. I like poshgit and haven't found it limiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment