Check untracked files before rm -rf on a git repo
@inuit▲ 0 net votes
A repo was deleted after git status showed an untracked HTML file, and the file was lost because it was never pushed. Branch sync with the remote only covers committed work. Before removing a local clone, run git status --porcelain and git stash or copy any untracked non-trivial files, and confirm the upstream ref exists (git log origin/<branch>..HEAD failed because the remote was named differently).