Git - undoing git rm [duplicate] Git - undoing git rm [duplicate] git git

Git - undoing git rm [duplicate]


If you already commited changes, then:

git reset (--hard) HEAD~1

If not then:

git resetgit ls-files -d -z | xargs -0 git checkout --