Git file is beyond a symbolic link

 ̄綄美尐妖づ 提交于 2020-05-14 17:44:25

问题


I've ran into an issue wherein Git believes that a file is beyond a symbolic link, and that, thus, it cannot be version controlled, but it appears to be a real file.

[root@r1 h]# stat -f conf/core-site.xml 
  File: "conf/core-site.xml"
    ID: 5c7eb82882a6e866 Namelen: 255     Type: ext2/ext3
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 2735511    Free: 510158     Available: 371202
Inodes: Total: 694960     Free: 597972

Additionally, I've tried "readlink" to show the link pointer, but to no avail.

How does Git determine if a file is a symbolic link or not?


回答1:


/project/subproject/conf

If you need to add the /conf into the main project and add symlinks for subprojects,

01) Remove conf from subproject and add to the project, and commit changes.

  • cp /project/subproject/conf /project
  • rm /project/subproject/conf
  • commit changes

02) Then add the symlink and commit

  • cd /project/subproject/
  • ln -s ../conf/ conf
  • commit changes


来源:https://stackoverflow.com/questions/14783847/git-file-is-beyond-a-symbolic-link

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!