I would like to create a repository that correctly represents the stages of development.
.git
folder. I am willing to use GitHub's client, Git Bash, git shell, or anything really in order to do this. I am most comfortable with the GitHub client software, but am more than happy to learn other methods.
If I wanted correct dates, should I change them via environment variables GIT_AUTHOR_DATE
and GIT_COMMITTER_DATE
(which I don't know how to do), or is it not worth the hassle? Or would the file's metadata (properties) maintain this information when committing it? This would be for aesthetic reasons mostly (as far as I can think of), as I'd be committing the files chronologically anyways.
I used the steps listed in "My plan" and it worked out perfectly.
IMHO, your planned method is fine.
When saying replacing the old folder with the next more recent snapshot folder, you need to take care that you're really replacing: delete everything in the repo except the .git
folder and then add the content of the next snapshot folder.
If you don't do it that way, you won't notice deletions between the snapshots correctly.
I would not play around with GIT_AUTHOR_DATE
and GIT_COMMITTER_DATE
unless you have a relation of a certain commit with a certain date (e.g. you need to know which version of your website was live on 01/01/2015 or something like that).
Even if you need to connect a certain commit to a certain state, I'd go for a tag in that case (e.g. git tag website_01_01_2015
).