I have a file (Change_Info-hello.txt) whose date modified is 2/10/2022
. I want to push this file to remote repository expecting to see the same date in remote repository branch.
I issued the following commands locally but looks like authored date is taking as current date and I am wondering when I will push to remote repo, I will see the current date instead of 2/10/2022
Any suggestion on how I can push the file where I can see 2/10/2022 in remote repo branch.
C:\Dummy\testing_git_timestamp\git_test_push_old_time>git add Change_Info-hello.txt
C:\Dummy\testing_git_timestamp\git_test_push_old_time>git commit -m "testing first push"
[master (root-commit) 6e1084d] testing first push
1 file changed, 1 insertion(+)
create mode 100644 Change_Info-hello.txt
C:\Dummy\testing_git_timestamp\git_test_push_old_time>git cat-file -p 6e1084d
tree e7fad102fe62c2fd382c54109e8347520b987b3e
author ryan xxxx <ryan xxxx@domain.com> 1679601209 -0400
committer ryan xxxx <ryan xxxx@domain.com> 1679601209 -0400
testing first push
C:\Dummy\testing_git_timestamp\git_test_push_old_time>git log --format=fuller
commit 6e1084db958824b89b26cfc2837d73372792a982 (HEAD -> master)
Author: ryan xxxx <ryan xxxx@domain.com>
AuthorDate: Thu Mar 23 15:53:29 2023 -0400
Commit: ryan xxxx <ryan xxxx@domain.com>
CommitDate: Thu Mar 23 15:53:29 2023 -0400
testing first push
C:\Dummy\testing_git_timestamp\git_test_push_old_time>