【发布时间】:2019-03-24 17:09:40
【问题描述】:
我想向我的存储库中的第一个提交添加更改。 我做了以下命令:
git tag root `git rev-list HEAD | tail -1`
git checkout -b new-root root
// changes in code
git add .
GIT_COMMITTER_DATE="Mon Oct 1 22:36:58 2018 +0200"
git commit --amend --no-edit --date="Mon Oct 1 22:36:58 2018 +0200"
git checkout @{-1}
git rebase --onto new-root root --committer-date-is-author-date
git branch -d new-root
git tag -d root
git push origin master --force
一切正常,除了在文件列表 (GitLab) 中,那些未被任何提交修改的文件的日期更新为新的:
谁能告诉我如何改进它?提前谢谢你!
【问题讨论】: