In Subversion (SVN), it's possible to do svn revert ./*
in which the current directory and only the current directory gets reverted.
What is the Git equivalent to svn revert
in which only the current directory gets reverted?
I know that there's git reset --hard
, but it reverts everything and not just the current directory.
How would I revert just the current directory in Git?
git checkout
instead of reset. – Aubreygit checkout <branchname>~1 -- path/to/directory/you/want/updated
should do the trick. The ~1 after the branch name means back one commit. – Sulfonmethane