简体   繁体   English

git $ Id $如何确保它被更新?

[英]git $Id$ how to ensure it is updated?

In my repository I used the .gitattributes and append $Id$ hashes to my files. 在我的存储库中,我使用.gitattributes并将$ Id $哈希值附加到文件中。 However in a typical commmit 但是在一个典型的委员会中

$git commit -a -m ""
$git push origin master

I notice that the embedded $Id$ in the modified files dont change. 我注意到在修改后的文件中嵌入的$ Id $不会更改。 A further 进一步

$git checkout modified_file.txt 

is necessary to ensure the updated $Id$. 是确保更新的$ Id $所必需的。

Is there a command to update all the hashes automatically? 是否有命令自动更新所有哈希?

ident and other effects attributes work only on check-out. ident和其他效果属性仅在签出时起作用。 To force checkout remove .git/index and run git reset --hard . 要强制签出,请删除.git/index并运行git reset --hard

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM