Why am I getting error "fatal: 'C:/Program Files (x86)/Git' is outside the repository" when I run "git reset --hard ~1" from within the repository?

Shayne

I'm running SourceTree on Windows 7 and when I open the MINGW32 command prompt from within the respository folder (at C:\DEV\Shayne\Quarks) and try to delete the last commit by entering the command git reset --hard ~1 I get the error fatal: 'C:/Program Files (x86)/Git' is outside the repository. The title bar of the command prompt reads MINGW32:c/DEV/Shayne/Quarks. I can't find any answers on Google and I've successfully run this command on this machine in the recent past. What is causing this error and how can I fix it?

Joel Rondeau

You are typing a bad command. You want to type

git reset --hard head~1

I have no idea why git reports this error when you type just ~1, but it does.

Update:

This appears to happen because of tilde expansion.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Why am I getting a 500 internal error when updating indexableText?

From Dev

Why am I getting an error in Prolog when trying out conc?

From Dev

Why am I getting a NoSuchBucket 404 error when forwarding www?

From Dev

Why am I getting an error when assigning tokens to a channel?

From Dev

Why I'm getting this error when I run my file?

From Dev

Why am I getting an "An exception was thrown while searching for persistence archives with ClassLoader" error when I attempt to run a JUnit test?

From Dev

Why am I getting the following error when compiling this assembly?

From Dev

Why am I getting an opencv error with size of images when they are as expected?

From Dev

Why am I getting error "fatal: 'C:/Program Files (x86)/Git' is outside the repository" when I run "git reset --hard ~1" from within the repository?

From Dev

Why am I getting an error when calling a webservice function?

From Dev

Why am I getting an error when trying to append HTML in AngularJS?

From Dev

Why am I getting an error for 'Column cannot be null' during my post api when I am passing a value from a html form

From Dev

Why am I getting a java.lang.StringIndexOutOfBoundsException error when I run?

From Dev

Why I am getting "no-undef " error when I run react js component class?

From Dev

Why Am I Getting A Type Error When Running This Function?

From Dev

Why am I getting this error

From Dev

Why am I getting a 403 error when I go to a site? Happens only from ONE of my computers

From Dev

Why am I getting an error when I populating a custom listview?

From Dev

Why am I getting an error when creating Spring Beans in JHipster?

From Dev

Why am I getting an error when I try to get a string from my table in a Jframe?

From Dev

Why am I getting an "An exception was thrown while searching for persistence archives with ClassLoader" error when I attempt to run a JUnit test?

From Dev

Why am I getting this error message when I am using NSTimer to run function every x seconds?

From Dev

Why am I getting this error message when searching for a library?

From Dev

Why am I getting an error when trying to add the src attribute to an img tag using JavaScript within Colfusion?

From Dev

Why I am getting $parse error when use it on object with array?

From Dev

I am getting on error when run "meteor run ios"

From Dev

Why am I getting an error when I try to print the contents of a file I am searching for?

From Dev

why am I getting an error when trying to generate rsa 128

From Dev

Why am I getting an error from texSubImage3D when loading data from an image

Related Related

  1. 1

    Why am I getting a 500 internal error when updating indexableText?

  2. 2

    Why am I getting an error in Prolog when trying out conc?

  3. 3

    Why am I getting a NoSuchBucket 404 error when forwarding www?

  4. 4

    Why am I getting an error when assigning tokens to a channel?

  5. 5

    Why I'm getting this error when I run my file?

  6. 6

    Why am I getting an "An exception was thrown while searching for persistence archives with ClassLoader" error when I attempt to run a JUnit test?

  7. 7

    Why am I getting the following error when compiling this assembly?

  8. 8

    Why am I getting an opencv error with size of images when they are as expected?

  9. 9

    Why am I getting error "fatal: 'C:/Program Files (x86)/Git' is outside the repository" when I run "git reset --hard ~1" from within the repository?

  10. 10

    Why am I getting an error when calling a webservice function?

  11. 11

    Why am I getting an error when trying to append HTML in AngularJS?

  12. 12

    Why am I getting an error for 'Column cannot be null' during my post api when I am passing a value from a html form

  13. 13

    Why am I getting a java.lang.StringIndexOutOfBoundsException error when I run?

  14. 14

    Why I am getting "no-undef " error when I run react js component class?

  15. 15

    Why Am I Getting A Type Error When Running This Function?

  16. 16

    Why am I getting this error

  17. 17

    Why am I getting a 403 error when I go to a site? Happens only from ONE of my computers

  18. 18

    Why am I getting an error when I populating a custom listview?

  19. 19

    Why am I getting an error when creating Spring Beans in JHipster?

  20. 20

    Why am I getting an error when I try to get a string from my table in a Jframe?

  21. 21

    Why am I getting an "An exception was thrown while searching for persistence archives with ClassLoader" error when I attempt to run a JUnit test?

  22. 22

    Why am I getting this error message when I am using NSTimer to run function every x seconds?

  23. 23

    Why am I getting this error message when searching for a library?

  24. 24

    Why am I getting an error when trying to add the src attribute to an img tag using JavaScript within Colfusion?

  25. 25

    Why I am getting $parse error when use it on object with array?

  26. 26

    I am getting on error when run "meteor run ios"

  27. 27

    Why am I getting an error when I try to print the contents of a file I am searching for?

  28. 28

    why am I getting an error when trying to generate rsa 128

  29. 29

    Why am I getting an error from texSubImage3D when loading data from an image

HotTag

Archive