FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.44k stars 637 forks source link

First run deleted my local git repository #109

Closed ksteigerwald closed 11 years ago

ksteigerwald commented 11 years ago

Tried this on two repositories. I followed instructions installed the software via node, created a an ~/.ungitrc in my home directory. Ran ungit inside my source repository... returns the following: find: ./.git: No such file or directory

following, .git is removed from my source directory.

I very much need them back...

FredrikNoren commented 11 years ago

Wow that sounds really bad. The only thing in a normal ungit install that removes files is the discard changes feature, though I'm not sure how that would be able to get connected to the .git directory. Do you have a way to reproduce this problem?

ghost commented 11 years ago

ksteigerwald: give Recuva a look http://www.piriform.com/recuva

Ajedi32 commented 11 years ago

Any chance you could put that in a code block to make it a bit more readable?

ksteigerwald commented 11 years ago

I can, below are the steps with in my terminal, notice that the terminal no longer shows the git branch at the end of the comment:

ksteiger@localhost gittest $ git init
Initialized empty Git repository in /Users/ksteiger/apps/gittest/.git/
ksteiger@localhost gittest $ touch 
.git/       foobar.txt  
ksteiger@localhost gittest $ touch foobar.txt 
ksteiger@localhost gittest $ gst
- On branch master
-
- Initial commit
-
- Untracked files:
-   (use "git add <file>..." to include in what will be committed)
-
-   foobar.txt
nothing added to commit but untracked files present (use "git add" to track)
ksteiger@localhost gittest $ git commit -a -m "touchy"
- On branch master
-
- Initial commit
-
- Untracked files:
-   (use "git add <file>..." to include in what will be committed)
-
-   foobar.txt
nothing added to commit but untracked files present (use "git add" to track)
ksteiger@localhost gittest $ git add .
ksteiger@localhost gittest $ git commit -a -m "touchy"
[master (root-commit) 4280f4f] touchy
 0 files changed
 create mode 100644 foobar.txt
ksteiger@localhost gittest (master) $ ungit
find: ./.git: No such file or directory
ksteiger@localhost gittest $ 
nroose commented 11 years ago

Is there a chance that "ungit" means something else in your environment? Perhaps it is aliased to something? If I do

grep find /usr/local/bin/ungit

I get nothing.

I am having problems with ungit, but nothing like this... Just stuff like

error: Error: spawn EMFILE at errnoException (child_process.js:980:11) at ChildProcess.spawn (child_process.js:927:11) at exports.spawn (child_process.js:715:9) at Object.exports.execFile (child_process.js:607:15) at Object.exports.exec (child_process.js:578:18) at /usr/local/lib/node_modules/ungit/source/git.js:12:31 at Object.q.process as _onImmediate at processImmediate as _immediateCallback info: Sending exception to bugsense

and ajax requests that never return.

And "ungit" sounds exactly like what I would name an alias if I wanted a fast way to remove .git directories, though I don't.

ksteigerwald commented 11 years ago

Oh man.... wiping the egg. I copied a few git alias commands some time back and never took the time to remember them all. ungit was on one. Apologies for the distraction.

Ajedi32 commented 11 years ago

@nroose Wow, good guess!