To put the prefix ? to codes by Git/SVN

后端 未结 4 2073
日久生厌
日久生厌 2020-11-28 12:49

How can you put the prefix ?v=VersionNumber to each file at your repository efficiently with Git/SVN?

I found out that SO uses the prac

4条回答
  •  一整个雨季
    2020-11-28 13:21

    Maybe you were looking for this:

    How do I enable ident string for Git repos?

    at least setting an $Id$ is possible and using filters will allow you some more options.

    Example (not best one) from this answer

    echo '*.txt ident' >> .gitattributes
    echo '$Id$' > test.txt
    git commit -a -m "test"
    
    rm test.txt
    git checkout -- test.txt
    cat test.txt
    

    See the manual for git-attributes.

提交回复
热议问题