Git changes my file permissions upon checkout

后端 未结 5 834
误落风尘
误落风尘 2020-12-02 22:51

Our workflow is develop on a local machine, commit the changes to a central repository, then check out the branch of that repository that we need.

The problem is tha

5条回答
  •  无人及你
    2020-12-02 23:14

    I often run a

    git checkout -f file.xml
    

    ... on a versioned file.xml with world-write permissions, as I continually modify it and want to return it to the normal state.

    But that resets the permissions. A slightly longer version:

    git show HEAD:./file.xml > ./file.xml
    

    Just resets the content.

提交回复
热议问题