进行git拉更改未跟踪文件的许可
我一直在遇到一个问题,即每当我进行git pult时,我不想通过git跟踪的所有文件都将许可从644更改为444(我当前正在使用Centos 7)。我正在使用.gitAttributes包含的git-lfs:
[!.]* filter=lfs diff=lfs merge=lfs -text lockable
我还将以下内容设置为.git/config,
[core]
filemode = false
autocrlf = true
我一直在使用git-lfs跟踪被推到远程服务器的所有类型的文件,但是有我希望留下来的文件可以在本地进行编辑。每次我从遥控器中拉更改时,都会更改许可。
I've been having a problem where all files that I don't want to be tracked by git keep changing permission from 644 to 444 whenever I do git pull (I'm currently using CentOS 7). I'm using git-lfs with the .gitattributes contains:
[!.]* filter=lfs diff=lfs merge=lfs -text lockable
I've also set the following in the .git/config
[core]
filemode = false
autocrlf = true
I've been using git-lfs to tracked all type of files that being pushed to the remote server but there are files that I wished stayed and can be edited locally. Its a hassle to change the permission everytime I am pulling the changes from remote.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果这些文件是“可锁定的”,则意味着您尝试使用
git lfs unlock
。那将使他们的锁定状态(444)更改为可以修改的一个(解锁,644)。
If those files are "lockable", that means you chan try and unlock them, using
git lfs unlock
.That would change their locked state (444) to one which can be modified (unlocked, 644).