... or at least have a way of recreating the code at a later point in time.
Two ideas:
create a git-diff, has many aspects to it, that are hard to get right, e.g. untracked files, non-ascii characters, git submodules, etc.
copy the complete source directory and run git clean to remove gitignore files and directory, e.g. it is important to remove virtual envs, because they are large, also other cache or build files from tests and executions
... or at least have a way of recreating the code at a later point in time.
Two ideas:
git clean
to remove gitignore files and directory, e.g. it is important to remove virtual envs, because they are large, also other cache or build files from tests and executions