I'd like to try out a few things with git and I don't want to screw anything up in the working repository.
To try to keep things safe, I've made a copy of the bare repo that I work from and from this repo I am intending to do all my pushes and tagging. I used:
cp --preseve -r original.git copy_of_original.git
Although I understand one can undo bad commits and whatnot, I don't want to leave the repo with all these reverted commits, nor do I want to do any refactoring, hence my desire to just work from a duplicate, bare repository.
The problem is, I execute the following:
git diff --name-only master@{"5 day ago"} master
and get back:
warning: Log for 'master' only goes back to Fri, 15 Feb 2013 20:42:43 -0500.
The original repo, which I don't want to touch, does indeed have files which were modified as of 5 days ago.
If I perform git log
on my copied repo, the record of these 5 day old changes are all still there.
What is going on here?
Is there a better way to make an independent copy of the repository?
Update 1
I realized I was imprecise with my question. I had run:
git diff --name-only master@{"5 day ago"}
in the directory produced from:
git clone copy_of_original.git clone_of_copy