Skip to content
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
Closed

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

kenwarner opened this issue Jul 13, 2013 · 10 comments

Comments

@kenwarner
Copy link

@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
Copy link
Collaborator

@JayBazuzi 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
Copy link
Author

@kenwarner kenwarner commented Jul 13, 2013

ah, good point. thanks

@kenwarner kenwarner closed this Jul 13, 2013
@codler
Copy link

@codler codler commented Oct 19, 2014

+1

@dougludlow
Copy link

@dougludlow dougludlow commented Mar 2, 2015

@JayBazuzi, you're a lifesaver.

@taeguk
Copy link

@taeguk taeguk commented Dec 26, 2015

+1

@Far3
Copy link

@Far3 Far3 commented Apr 14, 2016

@JayBazuzi Thank you!

@JawadS
Copy link

@JawadS 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
Copy link

@dougludlow dougludlow commented Nov 14, 2016

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

@JawadS
Copy link

@JawadS 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
Copy link

@dougludlow 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants