After being away for a while I saw the following message in one of my git repos: $ git status On branch yves/xxx Your branch is based on 'origin/yves/xxx', but the upstream is gone. (use "git branch --unset-upstream" to fixup) nothing to commit, working tree clean $ git branch --unset-upstream fatal: could not unset 'branch.yves/simple_projection.merge' At this point my .git/config file was empty, and all of my config was lost. I assume that things that rewrite .git/config do not check for a successful write before deleting the old version of the file. This was git version 2.14.1 Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"