Totty.js
Totty.js

Reputation: 15841

I've tried to change a branch but I aborted before it ended, now I have a lot of unstaged files

After the many unstaged files I've done git stash save --keep-index and now I have a lot of empty folders from the other branch. Now everything is messed up.

How to undo and only have the correct folders from my branch?

Upvotes: 0

Views: 28

Answers (1)

Putte
Putte

Reputation: 84

git clean -fd

Git only store files in its object store so if the directories are empty they will be removed.

See the git-clean docs for more information.

Upvotes: 1

Related Questions