Let's say I have a file like:
/** * A Test class * @version 2011.11.24 */ public class Test { }
I want the date stamp to be updated automatically every time it is bound to git , and there will be changes in the file. Is it possible?
git
You can write a clean filter. This will really happen if you add files to the staging area, which can be even better (because you can see the result without committing it).
Cleanup and blur filters are described here: https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#_keyword_expansion . This page also provides an example keyword extension for $Date$ using a small ruby ββscript.
$Date$
You can write a simple script to automatically check all source files and update dates, and then run them before each commit using the pre-commit hook. More information on git hooks can be found here.
Source: https://habr.com/ru/post/1382919/More articles:undefined link to `gzopen 'in moses - c ++Hibernate: the null-null property refers to a null value or a transition value - javaBest approach (template?) For creating view objects from different resources - javahitTest on CALayer - how do you find which actual layer was hit? - iosHow to initiate various actions based on the submit button on rails - ruby-on-railsProper use of nested #pragma omp for directives - c ++How to track malloc and free? - cManaging Exceptions in an ASP.NET MVC Application Using the Enterprise Library - c #Boost 1.48.0 upgrade_to_unique_lock on Linux: has something changed from 1.47 or am I something wrong? - c ++Is it possible to have WCF services using MSMQ and WCF services not using MSMQ on the same host? - wcfAll Articles