I have an issue where I want to branch off from an old revision but the check out of that branch is not removing files and folders that were only added after that branch in the revision history.
Why is this, and how can I got back to a point in the revision history and check out the entire project restoring the state exactly as it appears in that revision?
Here is how I'm doing it currently:
[add new folder lib/newlib to project, put some files in it]
> git add *
> git commit -a -m "new revision with folder lib/newlib/ and some new files"
> git tag old_version_tag {older revision hash}
> git branch old_version old_version_tag
> git co old_version
> ls lib
newlib
> git status
nothing to commit (working directory clean)
> rm -rf lib/newlib
> git status
nothing to commit (working directory clean)
Is there a better way to do it?