qw3rtman / git-fire

:fire: Save Your Code in an Emergency

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails when HEAD is detached or files don't have read permission

jyn514 opened this issue · comments

commented

git symbolic-ref HEAD returns this error:
fatal: ref HEAD is not a symbolic ref
git branch before running:

  • detached head
    master

git branch after running:

  • fire---1501874925
    master

If a file doesn't have read permissions (i.e. ~/.gnupg/S.gnupg-agent), it should commit all other files.

The full catastrophe:
`joshua@Debian:~/Documents$ ./git-fire

fatal: ref HEAD is not a symbolic ref
fatal: ref HEAD is not a symbolic ref

Switched to a new branch 'fire---1501874925'
error: open(""): Permission denied
error: unable to index file
fatal: updating files failed
On branch fire---1501874925
Changes not staged for commit:

Untracked files:

no changes added to commit
fatal: ambiguous argument 'stash': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Leave building!`

commented

Having trouble with markdown :(

commented

I just remembered I have something called a .gitignore. Please ignore me.