Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to change Date/ Time of push in github repo?

I have my school project that I have to submit as an final year project. I have commit history from last 4 months starting from March 3 (when I starting working on my project). I want to push the code on github. But when I push it, the repo
shows current time.

enter image description here

Is there any way so that it shows something like 4 months ago there?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

>Solution :

I helped my friend in school project with this.

Change the date whatever you want format: Year Month Day Hour Minute

GIT_AUTHOR_DATE=$(date -j -f '%Y%m%d%H%M' 201610160012) GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE" git commit -s -m "Your message"

Another version

GIT_AUTHOR_DATE=$(date -d'2022-03-18 18:30:18') GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE" git commit -s -m "message"
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading