Make git ignore modification date changes if the content of the file stays the same

后端 未结 2 1371
栀梦
栀梦 2021-02-05 07:58

I have python scripts which generate and modify different xml-files. They work so that they open a file, create an ElementTree object based on it, try to modify object\'s conten

2条回答
  •  天命终不由人
    2021-02-05 08:27

    Git doesn't report changes in modification time.

    $ git init
    Initialized empty Git repository in /home/choroba/...
    $ echo > a
    $ git add a
    $ git commit -m init
    [master (root-commit) d686390] init
     1 file changed, 1 insertion(+)
     create mode 100644 a
    $ touch -m a
    $ git status
    On branch master
    nothing to commit, working directory clean
    

提交回复
热议问题