Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

24
  • 5
    Just a side note: I used git count-objects -v to check if the files was actually removed but the size of the repository remains the same until I cloned the repository again. Git mantains a copy of all the original files I think. Commented Jul 21, 2015 at 9:39
  • 5
    With a non-ancient git, this should probably read --force-with-lease, not --force. Commented Apr 20, 2016 at 22:47
  • 6
    None of these commands work on windows. Or at least not Windows 10 please post the OS that the "cut and paste" works on Commented Nov 2, 2016 at 19:48
  • 8
    For Windows 10 users, this works nicely under Bash for Windows (I used Ubuntu) Commented Aug 13, 2017 at 1:31
  • 4
    I tried it with windows shell and with git bash, and did not work. First command pass, second command fail! Commented Nov 9, 2017 at 4:44