Skip to content

Instantly share code, notes, and snippets.

@dbb
Last active December 14, 2015 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbb/5021265 to your computer and use it in GitHub Desktop.
Save dbb/5021265 to your computer and use it in GitHub Desktop.
Github for Windows may delete your files from disk if you commit them while a file browser is open.
I sent the following message to github support on 24 Feb but have
not yet received a reply. I will update this post when I do.
------
I am on Windows 7 32-bit, using Github for Windows v 1.0, with
Cubic Explorer as my file browser.
I added some files to my repo using a file browser, then committed
them using Github for Windows. When I attempted to sync, it failed
with the error that the files were locked by another program such as
Visual Studio. That's fine, but it also *deleted all of those files
from the disk*. This seems like a huge flaw. I don't even understand
how a "locked" file could be deleted in the first place.
I was able to repeat this problem several times. The file browser was
the only program that could have been reading the files at the same
time as Github.
@mdirik
Copy link

mdirik commented Feb 25, 2013

if you commited them, just check them out back. no big deal.

@femaref
Copy link

femaref commented Feb 25, 2013

To drive this perfectly fine working car, first let somebody crash into it, then repair it. no big deal.

@dbb
Copy link
Author

dbb commented Feb 26, 2013

mdirik: The commit failed. Remember?

@mdirik
Copy link

mdirik commented Feb 26, 2013

The commit failed. Remember?

no, because you didn't tell.

I added some files to my repo using a file browser, then committed
them using Github for Windows. When I attempted to sync, it failed
with the error.

what i understand from this sentence is commit is done and push is failed.

@mdirik
Copy link

mdirik commented Feb 26, 2013

@femaref checking things out from a scm is nowhere near to repairing broken cars.

@femaref
Copy link

femaref commented Feb 26, 2013

It's a stupid proposition in both cases. An SCM shouldn't delete files unless asked to.

@dbb
Copy link
Author

dbb commented Feb 26, 2013

what i understand from this sentence is commit is done and push is failed.

No, they both failed. After the error message, the commits disappeared from the history: https://github.com/dbb/skyrim_ref_books/commits/master

Notice how "Add original book files" only appears once? These were the files that were deleted.

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