Say I've cloned a project and pushed my work and I'm done with it for now. I expect I may need to go back to it, so I'd like to keep the clone locally to quickly switch back, but there is also a chance I am done for good, so I'd like to dump the files from disk.
Is it possible to do this? To "archive" the local repo so I only keep the directory and .git
dir and git understands this state when running commands like git status
?
[EDIT:] The main reason for this question is so I can be lazy and not have to go find the repo URL to re-clone when I go back to work. This is really not a critical need but it could be pretty handy.
tar/zip seems to be the best workaround:
Here is a guide randomly yanked from the net.
This is just a simple workaround. If you are after something more like a backup, especially if the plan is to transfer the files, see @VonC's answer.