⑨ lab ≡ ByteLabs

Git/Tag with Past Commit Date

— Igor Böhm

After importing a Perforce managed repository to Git the use case to tag historic releases in Git has come up. The following shows how to create a tag with a commit date in the past:

 % git checkout --quiet 1910ea4e
 % GIT_COMMITTER_DATE=`{git show --format=%aD | head -n1}
 % echo $GIT_COMMITTER_DATE
 % git tag -a tag/release_2015.06 -m '[RELEASE] 2015.06 based on main/dev @502250'
 % git log | head
 % git checkout --quiet master
 % git push origin tag/release_2015.06

Good luck! You will need it …

#Dev #Plan9Port #Work