On Mar 4, 8:12 am, Marcin Krol <mrk...@gmail.com> wrote: > git checkout master > > doesn't [[check out files deleted from working tree]] > > I can do: > > git checkout test.txt > > and the file reappears in working treee. But that requires specifying > files one by one; suppose there's a lot of them. Is there any way to > mass-checkout all of them?
If you only want to restore all unstaged deletions, then git ls-files -z --deleted | xargs -0 git checkout -- If you want to discard all unstaged changes, then git checkout -- . If you want to discard staged changes to previously tracked files (freshly added files will remain), then git checkout HEAD -- . If you want to discard all staged changes, then git reset --hard -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.